<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Chapter 25 INFORMATION_SCHEMA Tables</title>
<link rel="stylesheet" href="mvl.css" type="text/css" />
<meta name="generator" content="DocBook XSL Stylesheets + chunker.py v1.9.2" />
<link rel="start" href="index.html" title="{book-title}" />
<link rel="up" href="" title="" />
<link rel="prev" href="stored-objects.html" title="Chapter 24 Stored Objects" />
<link rel="next" href="performance-schema.html" title="Chapter 26 MySQL Performance Schema" />
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center">Chapter 25 INFORMATION_SCHEMA Tables</th>
</tr>
<tr>
<td width="20%" align="left"><a accesskey="p" href="stored-objects.html">Prev</a> </td>
<th width="60%" align="center"></th>
<td width="20%" align="right"> <a accesskey="n" href="performance-schema.html">Next</a></td>
</tr>
</table>
<hr>
</div>
<div class="chapter">
<div class="titlepage">
<div>
<div>
<h1 class="title"><a name="information-schema"></a>Chapter 25 INFORMATION_SCHEMA Tables</h1>

</div>

</div>

</div>
<div class="toc">
<p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="information-schema.html#information-schema-introduction">25.1 Introduction</a></span></dt><dt><span class="section"><a href="information-schema.html#character-sets-table">25.2 The INFORMATION_SCHEMA CHARACTER_SETS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#check-constraints-table">25.3 The INFORMATION_SCHEMA CHECK_CONSTRAINTS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#collations-table">25.4 The INFORMATION_SCHEMA COLLATIONS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#collation-character-set-applicability-table">25.5 The INFORMATION_SCHEMA COLLATION_CHARACTER_SET_APPLICABILITY Table</a></span></dt><dt><span class="section"><a href="information-schema.html#columns-table">25.6 The INFORMATION_SCHEMA COLUMNS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#column-privileges-table">25.7 The INFORMATION_SCHEMA COLUMN_PRIVILEGES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#column-statistics-table">25.8 The INFORMATION_SCHEMA COLUMN_STATISTICS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#engines-table">25.9 The INFORMATION_SCHEMA ENGINES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#events-table">25.10 The INFORMATION_SCHEMA EVENTS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#files-table">25.11 The INFORMATION_SCHEMA FILES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#key-column-usage-table">25.12 The INFORMATION_SCHEMA KEY_COLUMN_USAGE Table</a></span></dt><dt><span class="section"><a href="information-schema.html#ndb-transid-mysql-connection-map-table">25.13 The INFORMATION_SCHEMA ndb_transid_mysql_connection_map Table</a></span></dt><dt><span class="section"><a href="information-schema.html#keywords-table">25.14 The INFORMATION_SCHEMA KEYWORDS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#optimizer-trace-table">25.15 The INFORMATION_SCHEMA OPTIMIZER_TRACE Table</a></span></dt><dt><span class="section"><a href="information-schema.html#parameters-table">25.16 The INFORMATION_SCHEMA PARAMETERS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#partitions-table">25.17 The INFORMATION_SCHEMA PARTITIONS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#plugins-table">25.18 The INFORMATION_SCHEMA PLUGINS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#processlist-table">25.19 The INFORMATION_SCHEMA PROCESSLIST Table</a></span></dt><dt><span class="section"><a href="information-schema.html#profiling-table">25.20 The INFORMATION_SCHEMA PROFILING Table</a></span></dt><dt><span class="section"><a href="information-schema.html#referential-constraints-table">25.21 The INFORMATION_SCHEMA REFERENTIAL_CONSTRAINTS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#resource-groups-table">25.22 The INFORMATION_SCHEMA RESOURCE_GROUPS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#routines-table">25.23 The INFORMATION_SCHEMA ROUTINES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#schemata-table">25.24 The INFORMATION_SCHEMA SCHEMATA Table</a></span></dt><dt><span class="section"><a href="information-schema.html#schema-privileges-table">25.25 The INFORMATION_SCHEMA SCHEMA_PRIVILEGES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#statistics-table">25.26 The INFORMATION_SCHEMA STATISTICS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#st-geometry-columns-table">25.27 The INFORMATION_SCHEMA ST_GEOMETRY_COLUMNS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#st-spatial-reference-systems-table">25.28 The INFORMATION_SCHEMA ST_SPATIAL_REFERENCE_SYSTEMS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#st-units-of-measure-table">25.29 The INFORMATION_SCHEMA ST_UNITS_OF_MEASURE Table</a></span></dt><dt><span class="section"><a href="information-schema.html#tables-table">25.30 The INFORMATION_SCHEMA TABLES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#tablespaces-table">25.31 The INFORMATION_SCHEMA TABLESPACES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#table-constraints-table">25.32 The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#table-privileges-table">25.33 The INFORMATION_SCHEMA TABLE_PRIVILEGES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#triggers-table">25.34 The INFORMATION_SCHEMA TRIGGERS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#user-privileges-table">25.35 The INFORMATION_SCHEMA USER_PRIVILEGES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#views-table">25.36 The INFORMATION_SCHEMA VIEWS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#view-routine-usage-table">25.37 The INFORMATION_SCHEMA VIEW_ROUTINE_USAGE Table</a></span></dt><dt><span class="section"><a href="information-schema.html#view-table-usage-table">25.38 The INFORMATION_SCHEMA VIEW_TABLE_USAGE Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-i_s-tables">25.39 INFORMATION_SCHEMA InnoDB Tables</a></span></dt><dd><dl><dt><span class="section"><a href="information-schema.html#innodb-buffer-page-table">25.39.1 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-buffer-page-lru-table">25.39.2 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE_LRU Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-buffer-pool-stats-table">25.39.3 The INFORMATION_SCHEMA INNODB_BUFFER_POOL_STATS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-cached-indexes-table">25.39.4 The INFORMATION_SCHEMA INNODB_CACHED_INDEXES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-cmp-table">25.39.5 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-cmpmem-table">25.39.6 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-cmp-per-index-table">25.39.7 The INFORMATION_SCHEMA INNODB_CMP_PER_INDEX and
INNODB_CMP_PER_INDEX_RESET Tables</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-columns-table">25.39.8 The INFORMATION_SCHEMA INNODB_COLUMNS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-datafiles-table">25.39.9 The INFORMATION_SCHEMA INNODB_DATAFILES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-fields-table">25.39.10 The INFORMATION_SCHEMA INNODB_FIELDS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-foreign-table">25.39.11 The INFORMATION_SCHEMA INNODB_FOREIGN Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-foreign-cols-table">25.39.12 The INFORMATION_SCHEMA INNODB_FOREIGN_COLS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-ft-being-deleted-table">25.39.13 The INFORMATION_SCHEMA INNODB_FT_BEING_DELETED Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-ft-config-table">25.39.14 The INFORMATION_SCHEMA INNODB_FT_CONFIG Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-ft-default-stopword-table">25.39.15 The INFORMATION_SCHEMA INNODB_FT_DEFAULT_STOPWORD Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-ft-deleted-table">25.39.16 The INFORMATION_SCHEMA INNODB_FT_DELETED Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-ft-index-cache-table">25.39.17 The INFORMATION_SCHEMA INNODB_FT_INDEX_CACHE Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-ft-index-table-table">25.39.18 The INFORMATION_SCHEMA INNODB_FT_INDEX_TABLE Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-indexes-table">25.39.19 The INFORMATION_SCHEMA INNODB_INDEXES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-locks-table">25.39.20 The INFORMATION_SCHEMA INNODB_LOCKS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-lock-waits-table">25.39.21 The INFORMATION_SCHEMA INNODB_LOCK_WAITS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-metrics-table">25.39.22 The INFORMATION_SCHEMA INNODB_METRICS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-session-temp-tablespaces-table">25.39.23 The INFORMATION_SCHEMA INNODB_SESSION_TEMP_TABLESPACES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-tables-table">25.39.24 The INFORMATION_SCHEMA INNODB_TABLES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-tablespaces-table">25.39.25 The INFORMATION_SCHEMA INNODB_TABLESPACES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-tablespaces-brief-table">25.39.26 The INFORMATION_SCHEMA INNODB_TABLESPACES_BRIEF Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-tablestats-table">25.39.27 The INFORMATION_SCHEMA INNODB_TABLESTATS View</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-temp-table-info-table">25.39.28 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-trx-table">25.39.29 The INFORMATION_SCHEMA INNODB_TRX Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-virtual-table">25.39.30 The INFORMATION_SCHEMA INNODB_VIRTUAL Table</a></span></dt></dl></dd><dt><span class="section"><a href="information-schema.html#thread-pool-i_s-tables">25.40 INFORMATION_SCHEMA Thread Pool Tables</a></span></dt><dd><dl><dt><span class="section"><a href="information-schema.html#tp-thread-group-state-table-old">25.40.1 The INFORMATION_SCHEMA TP_THREAD_GROUP_STATE Table</a></span></dt><dt><span class="section"><a href="information-schema.html#tp-thread-group-stats-table-old">25.40.2 The INFORMATION_SCHEMA TP_THREAD_GROUP_STATS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#tp-thread-state-table-old">25.40.3 The INFORMATION_SCHEMA TP_THREAD_STATE Table</a></span></dt></dl></dd><dt><span class="section"><a href="information-schema.html#connection-control-i_s-tables">25.41 INFORMATION_SCHEMA Connection-Control Tables</a></span></dt><dd><dl><dt><span class="section"><a href="information-schema.html#connection-control-failed-login-attempts-table">25.41.1 The INFORMATION_SCHEMA CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS Table</a></span></dt></dl></dd><dt><span class="section"><a href="information-schema.html#extended-show">25.42 Extensions to SHOW Statements</a></span></dt></dl>
</div>
<a class="indexterm" name="idm140091570852144"></a><a class="indexterm" name="idm140091570850688"></a><a class="indexterm" name="idm140091570849616"></a><a class="indexterm" name="idm140091570848544"></a><a class="indexterm" name="idm140091570847472"></a><p>
    <code class="literal">INFORMATION_SCHEMA</code> provides access to database
    <span class="firstterm">metadata</span>, information about
    the MySQL server such as the name of a database or table, the data
    type of a column, or access privileges. Other terms that are
    sometimes used for this information are
    <span class="firstterm">data dictionary</span> and
    <span class="firstterm">system catalog</span>.
</p>
<div class="section">

<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="information-schema-introduction"></a>25.1 Introduction</h2>
</div>
</div>
</div>
<p>
      <code class="literal">INFORMATION_SCHEMA</code> provides access to database
      <span class="firstterm">metadata</span>, information about
      the MySQL server such as the name of a database or table, the data
      type of a column, or access privileges. Other terms that are
      sometimes used for this information are
      <span class="firstterm">data dictionary</span> and
      <span class="firstterm">system catalog</span>.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p><a class="xref" href="information-schema.html#information-schema-usage-notes" title="INFORMATION_SCHEMA Usage Notes">INFORMATION_SCHEMA Usage Notes</a></p></li><li class="listitem"><p><a class="xref" href="information-schema.html#information-schema-character-set-considerations" title="Character Set Considerations">Character Set Considerations</a></p></li><li class="listitem"><p><a class="xref" href="information-schema.html#information-schema-as-show-alternative" title="INFORMATION_SCHEMA as Alternative to SHOW Statements">INFORMATION_SCHEMA as Alternative to SHOW Statements</a></p></li><li class="listitem"><p><a class="xref" href="information-schema.html#information-schema-privileges" title="INFORMATION_SCHEMA and Privileges">INFORMATION_SCHEMA and Privileges</a></p></li><li class="listitem"><p><a class="xref" href="information-schema.html#information-schema-performance-considerations" title="Performance Considerations">Performance Considerations</a></p></li><li class="listitem"><p><a class="xref" href="information-schema.html#information-schema-standards-considerations" title="Standards Considerations">Standards Considerations</a></p></li><li class="listitem"><p><a class="xref" href="information-schema.html#information-schema-conventions" title="Conventions in the INFORMATION_SCHEMA Reference Sections">Conventions in the INFORMATION_SCHEMA Reference Sections</a></p></li><li class="listitem"><p><a class="xref" href="information-schema.html#information-schema-related-information" title="Related Information">Related Information</a></p></li></ul>
</div>

<div class="simplesect">

<div class="titlepage">
<div>

<div class="simple">
<h3 class="title"><a name="information-schema-usage-notes"></a>INFORMATION_SCHEMA Usage Notes</h3>

</div>

</div>

</div>
<p>
        <code class="literal">INFORMATION_SCHEMA</code> is a database within each
        MySQL instance, the place that stores information about all the
        other databases that the MySQL server maintains. The
        <code class="literal">INFORMATION_SCHEMA</code> database contains several
        read-only tables. They are actually views, not base tables, so
        there are no files associated with them, and you cannot set
        triggers on them. Also, there is no database directory with that
        name.
      </p><p>
        Although you can select <code class="literal">INFORMATION_SCHEMA</code> as
        the default database with a <a class="link" href="sql-syntax.html#use" title="13.8.4 USE Syntax"><code class="literal">USE</code></a>
        statement, you can only read the contents of tables, not perform
        <a class="link" href="sql-syntax.html#insert" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a>,
        <a class="link" href="sql-syntax.html#update" title="13.2.12 UPDATE Syntax"><code class="literal">UPDATE</code></a>, or
        <a class="link" href="sql-syntax.html#delete" title="13.2.2 DELETE Syntax"><code class="literal">DELETE</code></a> operations on them.
      </p><p>
        Here is an example of a statement that retrieves information
        from <code class="literal">INFORMATION_SCHEMA</code>:
      </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT table_name, table_type, engine</code></strong>
       <strong class="userinput"><code>FROM information_schema.tables</code></strong>
       <strong class="userinput"><code>WHERE table_schema = 'db5'</code></strong>
       <strong class="userinput"><code>ORDER BY table_name;</code></strong>
+------------+------------+--------+
| table_name | table_type | engine |
+------------+------------+--------+
| fk         | BASE TABLE | InnoDB |
| fk2        | BASE TABLE | InnoDB |
| goto       | BASE TABLE | MyISAM |
| into       | BASE TABLE | MyISAM |
| k          | BASE TABLE | MyISAM |
| kurs       | BASE TABLE | MyISAM |
| loop       | BASE TABLE | MyISAM |
| pk         | BASE TABLE | InnoDB |
| t          | BASE TABLE | MyISAM |
| t2         | BASE TABLE | MyISAM |
| t3         | BASE TABLE | MyISAM |
| t7         | BASE TABLE | MyISAM |
| tables     | BASE TABLE | MyISAM |
| v          | VIEW       | NULL   |
| v2         | VIEW       | NULL   |
| v3         | VIEW       | NULL   |
| v56        | VIEW       | NULL   |
+------------+------------+--------+
17 rows in set (0.01 sec)
</pre><p>
        Explanation: The statement requests a list of all the tables in
        database <code class="literal">db5</code>, showing just three pieces of
        information: the name of the table, its type, and its storage
        engine.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h3 class="title"><a name="information-schema-character-set-considerations"></a>Character Set Considerations</h3>

</div>

</div>

</div>
<p>
        The definition for character columns (for example,
        <code class="literal">TABLES.TABLE_NAME</code>) is generally
        <code class="literal">VARCHAR(<em class="replaceable"><code>N</code></em>) CHARACTER SET
        utf8</code> where <em class="replaceable"><code>N</code></em> is at least
        64. MySQL uses the default collation for this character set
        (<code class="literal">utf8_general_ci</code>) for all searches, sorts,
        comparisons, and other string operations on such columns.
      </p><p>
        Because some MySQL objects are represented as files, searches in
        <code class="literal">INFORMATION_SCHEMA</code> string columns can be
        affected by file system case sensitivity. For more information,
        see <a class="xref" href="charset.html#charset-collation-information-schema" title="10.8.7 Using Collation in INFORMATION_SCHEMA Searches">Section 10.8.7, “Using Collation in INFORMATION_SCHEMA Searches”</a>.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h3 class="title"><a name="information-schema-as-show-alternative"></a>INFORMATION_SCHEMA as Alternative to SHOW Statements</h3>

</div>

</div>

</div>
<p>
        The <code class="literal">SELECT ... FROM INFORMATION_SCHEMA</code>
        statement is intended as a more consistent way to provide access
        to the information provided by the various
        <a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a> statements that MySQL
        supports (<a class="link" href="sql-syntax.html#show-databases" title="13.7.6.14 SHOW DATABASES Syntax"><code class="literal">SHOW DATABASES</code></a>,
        <a class="link" href="sql-syntax.html#show-tables" title="13.7.6.37 SHOW TABLES Syntax"><code class="literal">SHOW TABLES</code></a>, and so forth). Using
        <a class="link" href="sql-syntax.html#select" title="13.2.10 SELECT Syntax"><code class="literal">SELECT</code></a> has these advantages,
        compared to <a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a>:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            It conforms to Codd's rules, because all access is done on
            tables.
          </p></li><li class="listitem"><p>
            You can use the familiar syntax of the
            <a class="link" href="sql-syntax.html#select" title="13.2.10 SELECT Syntax"><code class="literal">SELECT</code></a> statement, and only
            need to learn some table and column names.
          </p></li><li class="listitem"><p>
            The implementor need not worry about adding keywords.
          </p></li><li class="listitem"><p>
            You can filter, sort, concatenate, and transform the results
            from <code class="literal">INFORMATION_SCHEMA</code> queries into
            whatever format your application needs, such as a data
            structure or a text representation to parse.
          </p></li><li class="listitem"><p>
            This technique is more interoperable with other database
            systems. For example, Oracle Database users are familiar
            with querying tables in the Oracle data dictionary.
</p></li></ul>
</div>
<p>
        Because <a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a> is familiar and
        widely used, the <a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a> statements
        remain as an alternative. In fact, along with the implementation
        of <code class="literal">INFORMATION_SCHEMA</code>, there are enhancements
        to <a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a> as described in
        <a class="xref" href="information-schema.html#extended-show" title="25.42 Extensions to SHOW Statements">Section 25.42, “Extensions to SHOW Statements”</a>.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h3 class="title"><a name="information-schema-privileges"></a>INFORMATION_SCHEMA and Privileges</h3>

</div>

</div>

</div>
<p>
        Each MySQL user has the right to access these tables, but can
        see only the rows in the tables that correspond to objects for
        which the user has the proper access privileges. In some cases
        (for example, the <code class="literal">ROUTINE_DEFINITION</code> column
        in the <code class="literal">INFORMATION_SCHEMA</code>
        <a class="link" href="information-schema.html#routines-table" title="25.23 The INFORMATION_SCHEMA ROUTINES Table"><code class="literal">ROUTINES</code></a> table), users who have
        insufficient privileges see <code class="literal">NULL</code>. These
        restrictions do not apply for
        <a class="link" href="innodb-storage-engine.html" title="Chapter 15 The InnoDB Storage Engine"><code class="literal">InnoDB</code></a> tables; you can see them
        with only the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a> privilege.
      </p><p>
        The same privileges apply to selecting information from
        <code class="literal">INFORMATION_SCHEMA</code> and viewing the same
        information through <a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a>
        statements. In either case, you must have some privilege on an
        object to see information about it.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h3 class="title"><a name="information-schema-performance-considerations"></a>Performance Considerations</h3>

</div>

</div>

</div>
<p>
        <code class="literal">INFORMATION_SCHEMA</code> queries that search for
        information from more than one database might take a long time
        and impact performance. To check the efficiency of a query, you
        can use <a class="link" href="sql-syntax.html#explain" title="13.8.2 EXPLAIN Syntax"><code class="literal">EXPLAIN</code></a>. For information
        about using <a class="link" href="sql-syntax.html#explain" title="13.8.2 EXPLAIN Syntax"><code class="literal">EXPLAIN</code></a> output to
        tune <code class="literal">INFORMATION_SCHEMA</code> queries, see
        <a class="xref" href="optimization.html#information-schema-optimization" title="8.2.3 Optimizing INFORMATION_SCHEMA Queries">Section 8.2.3, “Optimizing INFORMATION_SCHEMA Queries”</a>.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h3 class="title"><a name="information-schema-standards-considerations"></a>Standards Considerations</h3>

</div>

</div>

</div>
<p>
        The implementation for the <code class="literal">INFORMATION_SCHEMA</code>
        table structures in MySQL follows the ANSI/ISO SQL:2003 standard
        Part 11 <em class="citetitle">Schemata</em>. Our intent is
        approximate compliance with SQL:2003 core feature F021
        <em class="citetitle">Basic information schema</em>.
      </p><p>
        Users of SQL Server 2000 (which also follows the standard) may
        notice a strong similarity. However, MySQL has omitted many
        columns that are not relevant for our implementation, and added
        columns that are MySQL-specific. One such added column is the
        <code class="literal">ENGINE</code> column in the
        <code class="literal">INFORMATION_SCHEMA</code>
        <a class="link" href="information-schema.html#tables-table" title="25.30 The INFORMATION_SCHEMA TABLES Table"><code class="literal">TABLES</code></a> table.
      </p><p>
        Although other DBMSs use a variety of names, like
        <code class="literal">syscat</code> or <code class="literal">system</code>, the
        standard name is <code class="literal">INFORMATION_SCHEMA</code>.
      </p><p>
        To avoid using any name that is reserved in the standard or in
        DB2, SQL Server, or Oracle, we changed the names of some columns
        marked <span class="quote">“<span class="quote">MySQL extension</span>”</span>. (For example, we changed
        <code class="literal">COLLATION</code> to
        <code class="literal">TABLE_COLLATION</code> in the
        <a class="link" href="information-schema.html#tables-table" title="25.30 The INFORMATION_SCHEMA TABLES Table"><code class="literal">TABLES</code></a> table.) See the list of
        reserved words near the end of this article:
        <a class="ulink" href="https://web.archive.org/web/20070428032454/http://www.dbazine.com/db2/db2-disarticles/gulutzan5" target="_top">https://web.archive.org/web/20070428032454/http://www.dbazine.com/db2/db2-disarticles/gulutzan5</a>.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h3 class="title"><a name="information-schema-conventions"></a>Conventions in the INFORMATION_SCHEMA Reference Sections</h3>

</div>

</div>

</div>
<p>
        The following sections describe each of the tables and columns
        in <code class="literal">INFORMATION_SCHEMA</code>. For each column, there
        are three pieces of information:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            <span class="quote">“<span class="quote"><code class="literal">INFORMATION_SCHEMA</code> Name</span>”</span>
            indicates the name for the column in the
            <code class="literal">INFORMATION_SCHEMA</code> table. This
            corresponds to the standard SQL name unless the
            <span class="quote">“<span class="quote">Remarks</span>”</span> field says <span class="quote">“<span class="quote">MySQL
            extension.</span>”</span>
          </p></li><li class="listitem"><p>
            <span class="quote">“<span class="quote"><a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a> Name</span>”</span>
            indicates the equivalent field name in the closest
            <a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a> statement, if there is
            one.
          </p></li><li class="listitem"><p>
            <span class="quote">“<span class="quote">Remarks</span>”</span> provides additional information where
            applicable. If this field is <code class="literal">NULL</code>, it
            means that the value of the column is always
            <code class="literal">NULL</code>. If this field says <span class="quote">“<span class="quote">MySQL
            extension,</span>”</span> the column is a MySQL extension to
            standard SQL.
</p></li></ul>
</div>
<p>
        Many sections indicate what <a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a>
        statement is equivalent to a
        <a class="link" href="sql-syntax.html#select" title="13.2.10 SELECT Syntax"><code class="literal">SELECT</code></a> that retrieves information
        from <code class="literal">INFORMATION_SCHEMA</code>. For
        <a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a> statements that display
        information for the default database if you omit a <code class="literal">FROM
        <em class="replaceable"><code>db_name</code></em></code> clause, you can
        often select information for the default database by adding an
        <code class="literal">AND TABLE_SCHEMA = SCHEMA()</code> condition to the
        <code class="literal">WHERE</code> clause of a query that retrieves
        information from an <code class="literal">INFORMATION_SCHEMA</code> table.
</p>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h3 class="title"><a name="information-schema-related-information"></a>Related Information</h3>

</div>

</div>

</div>
<p>
        These sections discuss additional
        <code class="literal">INFORMATION_SCHEMA</code>-related topics:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            information about <code class="literal">INFORMATION_SCHEMA</code>
            tables specific to the <a class="link" href="innodb-storage-engine.html" title="Chapter 15 The InnoDB Storage Engine"><code class="literal">InnoDB</code></a>
            storage engine: <a class="xref" href="information-schema.html#innodb-i_s-tables" title="25.39 INFORMATION_SCHEMA InnoDB Tables">Section 25.39, “INFORMATION_SCHEMA InnoDB Tables”</a>
          </p></li><li class="listitem"><p>
            information about <code class="literal">INFORMATION_SCHEMA</code>
            tables specific to the thread pool plugin:
            <a class="xref" href="information-schema.html#thread-pool-i_s-tables" title="25.40 INFORMATION_SCHEMA Thread Pool Tables">Section 25.40, “INFORMATION_SCHEMA Thread Pool Tables”</a>
          </p></li><li class="listitem"><p>
            information about <code class="literal">INFORMATION_SCHEMA</code>
            tables specific to the <code class="literal">CONNECTION_CONTROL</code>
            plugin: <a class="xref" href="information-schema.html#connection-control-i_s-tables" title="25.41 INFORMATION_SCHEMA Connection-Control Tables">Section 25.41, “INFORMATION_SCHEMA Connection-Control Tables”</a>
          </p></li><li class="listitem"><p>
            Answers to questions that are often asked concerning the
            <code class="literal">INFORMATION_SCHEMA</code> database:
            <a class="xref" href="faqs.html#faqs-information-schema" title="A.7 MySQL 8.0 FAQ: INFORMATION_SCHEMA">Section A.7, “MySQL 8.0 FAQ: INFORMATION_SCHEMA”</a>
          </p></li><li class="listitem"><p>
            <code class="literal">INFORMATION_SCHEMA</code> queries and the
            optimizer: <a class="xref" href="optimization.html#information-schema-optimization" title="8.2.3 Optimizing INFORMATION_SCHEMA Queries">Section 8.2.3, “Optimizing INFORMATION_SCHEMA Queries”</a>
          </p></li><li class="listitem"><p>
            The effect of collation on
            <code class="literal">INFORMATION_SCHEMA</code> comparisons:
            <a class="xref" href="charset.html#charset-collation-information-schema" title="10.8.7 Using Collation in INFORMATION_SCHEMA Searches">Section 10.8.7, “Using Collation in INFORMATION_SCHEMA Searches”</a>
</p></li></ul>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="character-sets-table"></a>25.2 The INFORMATION_SCHEMA CHARACTER_SETS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091570709840"></a><p>
      The <a class="link" href="information-schema.html#character-sets-table" title="25.2 The INFORMATION_SCHEMA CHARACTER_SETS Table"><code class="literal">CHARACTER_SETS</code></a> table provides
      information about available character sets.
    </p><p>
      The <a class="link" href="information-schema.html#character-sets-table" title="25.2 The INFORMATION_SCHEMA CHARACTER_SETS Table"><code class="literal">CHARACTER_SETS</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">CHARACTER_SET_NAME</code>
        </p><p>
          The character set name.
        </p></li><li class="listitem"><p>
          <code class="literal">DEFAULT_COLLATE_NAME</code>
        </p><p>
          The default collation for the character set.
        </p></li><li class="listitem"><p>
          <code class="literal">DESCRIPTION</code>
        </p><p>
          A description of the character set.
        </p></li><li class="listitem"><p>
          <code class="literal">MAXLEN</code>
        </p><p>
          The maximum number of bytes required to store one character.
</p></li></ul>
</div>
<h3><a name="idm140091570697008"></a>Notes</h3>
<p>
      Character set information is also available from the
      <a class="link" href="sql-syntax.html#show-character-set" title="13.7.6.3 SHOW CHARACTER SET Syntax"><code class="literal">SHOW CHARACTER SET</code></a> statement. See
      <a class="xref" href="sql-syntax.html#show-character-set" title="13.7.6.3 SHOW CHARACTER SET Syntax">Section 13.7.6.3, “SHOW CHARACTER SET Syntax”</a>. The following statements are
      equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT * FROM INFORMATION_SCHEMA.CHARACTER_SETS
  [WHERE CHARACTER_SET_NAME LIKE '<em class="replaceable"><code>wild</code></em>']

SHOW CHARACTER SET
  [LIKE '<em class="replaceable"><code>wild</code></em>']
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="check-constraints-table"></a>25.3 The INFORMATION_SCHEMA CHECK_CONSTRAINTS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091570690816"></a><p>
      The <a class="link" href="information-schema.html#check-constraints-table" title="25.3 The INFORMATION_SCHEMA CHECK_CONSTRAINTS Table"><code class="literal">CHECK_CONSTRAINTS</code></a> table
      (available as of MySQL 8.0.16) provides information about
      <code class="literal">CHECK</code> constraints defined on tables.
    </p><p>
      The <a class="link" href="information-schema.html#check-constraints-table" title="25.3 The INFORMATION_SCHEMA CHECK_CONSTRAINTS Table"><code class="literal">CHECK_CONSTRAINTS</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">CONSTRAINT_CATALOG</code>
        </p><p>
          The name of the catalog to which the constraint belongs. This
          value is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">CONSTRAINT_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the constraint
          belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">CONSTRAINT_NAME</code>
        </p><p>
          The name of the constraint.
        </p></li><li class="listitem"><p>
          <code class="literal">CHECK_CLAUSE</code>
        </p><p>
          The expression that specifies the constraint condition.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="collations-table"></a>25.4 The INFORMATION_SCHEMA COLLATIONS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091570675152"></a><p>
      The <a class="link" href="information-schema.html#collations-table" title="25.4 The INFORMATION_SCHEMA COLLATIONS Table"><code class="literal">COLLATIONS</code></a> table provides
      information about collations for each character set.
    </p><p>
      The <a class="link" href="information-schema.html#collations-table" title="25.4 The INFORMATION_SCHEMA COLLATIONS Table"><code class="literal">COLLATIONS</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">COLLATION_NAME</code>
        </p><p>
          The collation name.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_SET_NAME</code>
        </p><p>
          The name of the character set with which the collation is
          associated.
        </p></li><li class="listitem"><p>
          <code class="literal">ID</code>
        </p><p>
          The collation ID.
        </p></li><li class="listitem"><p>
          <code class="literal">IS_DEFAULT</code>
        </p><p>
          Whether the collation is the default for its character set.
        </p></li><li class="listitem"><p>
          <code class="literal">IS_COMPILED</code>
        </p><p>
          Whether the character set is compiled into the server.
        </p></li><li class="listitem"><p>
          <code class="literal">SORTLEN</code>
        </p><p>
          This is related to the amount of memory required to sort
          strings expressed in the character set.
        </p></li><li class="listitem"><p>
          <code class="literal">PAD_ATTRIBUTE</code>
        </p><p>
          The collation pad attribute.
</p></li></ul>
</div>
<h3><a name="idm140091570656464"></a>Notes</h3>
<p>
      Collation information is also available from the
      <a class="link" href="sql-syntax.html#show-collation" title="13.7.6.4 SHOW COLLATION Syntax"><code class="literal">SHOW COLLATION</code></a> statement. See
      <a class="xref" href="sql-syntax.html#show-collation" title="13.7.6.4 SHOW COLLATION Syntax">Section 13.7.6.4, “SHOW COLLATION Syntax”</a>. The following statements are
      equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT COLLATION_NAME FROM INFORMATION_SCHEMA.COLLATIONS
  [WHERE COLLATION_NAME LIKE '<em class="replaceable"><code>wild</code></em>']

SHOW COLLATION
  [LIKE '<em class="replaceable"><code>wild</code></em>']
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="collation-character-set-applicability-table"></a>25.5 The INFORMATION_SCHEMA COLLATION_CHARACTER_SET_APPLICABILITY Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091570650080"></a><p>
      The
      <a class="link" href="information-schema.html#collation-character-set-applicability-table" title="25.5 The INFORMATION_SCHEMA COLLATION_CHARACTER_SET_APPLICABILITY Table"><code class="literal">COLLATION_CHARACTER_SET_APPLICABILITY</code></a>
      table indicates what character set is applicable for what
      collation.
    </p><p>
      The
      <a class="link" href="information-schema.html#collation-character-set-applicability-table" title="25.5 The INFORMATION_SCHEMA COLLATION_CHARACTER_SET_APPLICABILITY Table"><code class="literal">COLLATION_CHARACTER_SET_APPLICABILITY</code></a>
      table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">COLLATION_NAME</code>
        </p><p>
          The collation name.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_SET_NAME</code>
        </p><p>
          The name of the character set with which the collation is
          associated.
</p></li></ul>
</div>
<h3><a name="idm140091570640800"></a>Notes</h3>
<p>
      The
      <a class="link" href="information-schema.html#collation-character-set-applicability-table" title="25.5 The INFORMATION_SCHEMA COLLATION_CHARACTER_SET_APPLICABILITY Table"><code class="literal">COLLATION_CHARACTER_SET_APPLICABILITY</code></a>
      columns are equivalent to the first two columns displayed by the
      <a class="link" href="sql-syntax.html#show-collation" title="13.7.6.4 SHOW COLLATION Syntax"><code class="literal">SHOW COLLATION</code></a> statement.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="columns-table"></a>25.6 The INFORMATION_SCHEMA COLUMNS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091570635936"></a><p>
      The <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table provides
      information about columns in tables. The related
      <a class="link" href="information-schema.html#st-geometry-columns-table" title="25.27 The INFORMATION_SCHEMA ST_GEOMETRY_COLUMNS Table"><code class="literal">ST_GEOMETRY_COLUMNS</code></a> table provides
      information about table columns that store spatial data. See
      <a class="xref" href="information-schema.html#st-geometry-columns-table" title="25.27 The INFORMATION_SCHEMA ST_GEOMETRY_COLUMNS Table">Section 25.27, “The INFORMATION_SCHEMA ST_GEOMETRY_COLUMNS Table”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TABLE_CATALOG</code>
        </p><p>
          The name of the catalog to which the table containing the
          column belongs. This value is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the table
          containing the column belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the table containing the column.
        </p></li><li class="listitem"><p>
          <code class="literal">COLUMN_NAME</code>
        </p><p>
          The name of the column.
        </p></li><li class="listitem"><p>
          <code class="literal">ORDINAL_POSITION</code>
        </p><p>
          The position of the column within the table.
          <code class="literal">ORDINAL_POSITION</code> is necessary because you
          might want to say <code class="literal">ORDER BY
          ORDINAL_POSITION</code>. Unlike <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW
          COLUMNS</code></a>, <a class="link" href="sql-syntax.html#select" title="13.2.10 SELECT Syntax"><code class="literal">SELECT</code></a> from
          the <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table does not have
          automatic ordering.
        </p></li><li class="listitem"><p>
          <code class="literal">COLUMN_DEFAULT</code>
        </p><p>
          The default value for the column. This is
          <code class="literal">NULL</code> if the column has an explicit default
          of <code class="literal">NULL</code>, or if the column definition
          includes no <code class="literal">DEFAULT</code> clause.
        </p></li><li class="listitem"><p>
          <code class="literal">IS_NULLABLE</code>
        </p><p>
          The column nullability. The value is <code class="literal">YES</code> if
          <code class="literal">NULL</code> values can be stored in the column,
          <code class="literal">NO</code> if not.
        </p></li><li class="listitem"><p>
          <code class="literal">DATA_TYPE</code>
        </p><p>
          The column data type.
        </p><p>
          The <code class="literal">DATA_TYPE</code> value is the type name only
          with no other information. The <code class="literal">COLUMN_TYPE</code>
          value contains the type name and possibly other information
          such as the precision or length.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_MAXIMUM_LENGTH</code>
        </p><p>
          For string columns, the maximum length in characters.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_OCTET_LENGTH</code>
        </p><p>
          For string columns, the maximum length in bytes.
        </p></li><li class="listitem"><p>
          <code class="literal">NUMERIC_PRECISION</code>
        </p><p>
          For numeric columns, the numeric precision.
        </p></li><li class="listitem"><p>
          <code class="literal">NUMERIC_SCALE</code>
        </p><p>
          For numeric columns, the numeric scale.
        </p></li><li class="listitem"><p>
          <code class="literal">DATETIME_PRECISION</code>
        </p><p>
          For temporal columns, the fractional seconds precision.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_SET_NAME</code>
        </p><p>
          For character string columns, the character set name.
        </p></li><li class="listitem"><p>
          <code class="literal">COLLATION_NAME</code>
        </p><p>
          For character string columns, the collation name.
        </p></li><li class="listitem"><p>
          <code class="literal">COLUMN_TYPE</code>
        </p><p>
          The column data type.
        </p><p>
          The <code class="literal">DATA_TYPE</code> value is the type name only
          with no other information. The <code class="literal">COLUMN_TYPE</code>
          value contains the type name and possibly other information
          such as the precision or length.
        </p></li><li class="listitem"><p>
          <code class="literal">COLUMN_KEY</code>
        </p><p>
          Whether the column is indexed:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              If <code class="literal">COLUMN_KEY</code> is empty, the column
              either is not indexed or is indexed only as a secondary
              column in a multiple-column, nonunique index.
            </p></li><li class="listitem"><p>
              If <code class="literal">COLUMN_KEY</code> is
              <code class="literal">PRI</code>, the column is a <code class="literal">PRIMARY
              KEY</code> or is one of the columns in a
              multiple-column <code class="literal">PRIMARY KEY</code>.
            </p></li><li class="listitem"><p>
              If <code class="literal">COLUMN_KEY</code> is
              <code class="literal">UNI</code>, the column is the first column of
              a <code class="literal">UNIQUE</code> index. (A
              <code class="literal">UNIQUE</code> index permits multiple
              <code class="literal">NULL</code> values, but you can tell whether
              the column permits <code class="literal">NULL</code> by checking the
              <code class="literal">Null</code> column.)
            </p></li><li class="listitem"><p>
              If <code class="literal">COLUMN_KEY</code> is
              <code class="literal">MUL</code>, the column is the first column of
              a nonunique index in which multiple occurrences of a given
              value are permitted within the column.
</p></li></ul>
</div>
<p>
          If more than one of the <code class="literal">COLUMN_KEY</code> values
          applies to a given column of a table,
          <code class="literal">COLUMN_KEY</code> displays the one with the
          highest priority, in the order <code class="literal">PRI</code>,
          <code class="literal">UNI</code>, <code class="literal">MUL</code>.
        </p><p>
          A <code class="literal">UNIQUE</code> index may be displayed as
          <code class="literal">PRI</code> if it cannot contain
          <code class="literal">NULL</code> values and there is no
          <code class="literal">PRIMARY KEY</code> in the table. A
          <code class="literal">UNIQUE</code> index may display as
          <code class="literal">MUL</code> if several columns form a composite
          <code class="literal">UNIQUE</code> index; although the combination of
          the columns is unique, each column can still hold multiple
          occurrences of a given value.
        </p></li><li class="listitem"><p>
          <code class="literal">EXTRA</code>
        </p><p>
          Any additional information that is available about a given
          column. The value is nonempty in these cases:
</p><a class="indexterm" name="idm140091570556224"></a>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              <code class="literal">auto_increment</code> for columns that have
              the <code class="literal">AUTO_INCREMENT</code> attribute.
            </p></li><li class="listitem"><p>
              <code class="literal">on update CURRENT_TIMESTAMP</code> for
              <a class="link" href="data-types.html#datetime" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">TIMESTAMP</code></a> or
              <a class="link" href="data-types.html#datetime" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">DATETIME</code></a> columns that have
              the <code class="literal">ON UPDATE CURRENT_TIMESTAMP</code>
              attribute.
            </p></li><li class="listitem"><p>
              <code class="literal">VIRTUAL GENERATED</code> or <code class="literal">VIRTUAL
              STORED</code> for generated columns.
            </p></li><li class="listitem"><p>
              <code class="literal">DEFAULT_GENERATED</code> for columns that have
              an expression default value.
</p></li></ul>
</div>
</li><li class="listitem"><p>
          <code class="literal">PRIVILEGES</code>
        </p><p>
          The privileges you have for the column.
        </p></li><li class="listitem"><p>
          <code class="literal">COLUMN_COMMENT</code>
        </p><p>
          Any comment included in the column definition.
        </p></li><li class="listitem"><p>
          <code class="literal">GENERATION_EXPRESSION</code>
        </p><a class="indexterm" name="idm140091570538272"></a><p>
          For generated columns, displays the expression used to compute
          column values. Empty for nongenerated columns. For information
          about generated columns, see
          <a class="xref" href="sql-syntax.html#create-table-generated-columns" title="13.1.20.9 CREATE TABLE and Generated Columns">Section 13.1.20.9, “CREATE TABLE and Generated Columns”</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">SRS_ID</code>
        </p><p>
          This value applies to spatial columns. It contains the column
          <code class="literal">SRID</code> value that indicates the spatial
          reference system for values stored in the column. See
          <a class="xref" href="data-types.html#spatial-type-overview" title="11.5.1 Spatial Data Types">Section 11.5.1, “Spatial Data Types”</a>, and
          <a class="xref" href="data-types.html#spatial-reference-systems" title="11.5.5 Spatial Reference System Support">Section 11.5.5, “Spatial Reference System Support”</a>. The value is
          <code class="literal">NULL</code> for nonspatial columns and spatial
          columns with no <code class="literal">SRID</code> attribute.
</p></li></ul>
</div>
<h3><a name="idm140091570529584"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          In <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a>, the
          <code class="literal">Type</code> display includes values from several
          different <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> columns.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_OCTET_LENGTH</code> should be the same
          as <code class="literal">CHARACTER_MAXIMUM_LENGTH</code>, except for
          multibyte character sets.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_SET_NAME</code> can be derived from
          <code class="literal">COLLATION_NAME</code>. For example, if you say
          <code class="literal">SHOW FULL COLUMNS FROM t</code>, and you see in
          the <code class="literal">COLLATION_NAME</code> column a value of
          <code class="literal">utf8_swedish_ci</code>, the character set is what
          is before the first underscore: <code class="literal">utf8</code>.
</p></li></ul>
</div>
<p>
      Column information is also available from the
      <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement. See
      <a class="xref" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax">Section 13.7.6.5, “SHOW COLUMNS Syntax”</a>. The following statements are
      nearly equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT COLUMN_NAME, DATA_TYPE, IS_NULLABLE, COLUMN_DEFAULT
  FROM INFORMATION_SCHEMA.COLUMNS
  WHERE table_name = '<em class="replaceable"><code>tbl_name</code></em>'
  [AND table_schema = '<em class="replaceable"><code>db_name</code></em>']
  [AND column_name LIKE '<em class="replaceable"><code>wild</code></em>']

SHOW COLUMNS
  FROM <em class="replaceable"><code>tbl_name</code></em>
  [FROM <em class="replaceable"><code>db_name</code></em>]
  [LIKE '<em class="replaceable"><code>wild</code></em>']
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="column-privileges-table"></a>25.7 The INFORMATION_SCHEMA COLUMN_PRIVILEGES Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091570509552"></a><p>
      The <a class="link" href="information-schema.html#column-privileges-table" title="25.7 The INFORMATION_SCHEMA COLUMN_PRIVILEGES Table"><code class="literal">COLUMN_PRIVILEGES</code></a> table provides
      information about column privileges. It takes its values from the
      <code class="literal">mysql.columns_priv</code> system table.
    </p><p>
      The <a class="link" href="information-schema.html#column-privileges-table" title="25.7 The INFORMATION_SCHEMA COLUMN_PRIVILEGES Table"><code class="literal">COLUMN_PRIVILEGES</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">GRANTEE</code>
        </p><p>
          The name of the account to which the privilege is granted, in
          <code class="literal">'<em class="replaceable"><code>user_name</code></em>'@'<em class="replaceable"><code>host_name</code></em>'</code>
          format.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_CATALOG</code>
        </p><p>
          The name of the catalog to which the table containing the
          column belongs. This value is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the table
          containing the column belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the table containing the column.
        </p></li><li class="listitem"><p>
          <code class="literal">COLUMN_NAME</code>
        </p><p>
          The name of the column.
        </p></li><li class="listitem"><p>
          <code class="literal">PRIVILEGE_TYPE</code>
        </p><p>
          The privilege granted. The value can be any privilege that can
          be granted at the column level; see <a class="xref" href="sql-syntax.html#grant" title="13.7.1.6 GRANT Syntax">Section 13.7.1.6, “GRANT Syntax”</a>.
          Each row lists a single privilege, so there is one row per
          column privilege held by the grantee.
        </p><p>
          In the output from
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW FULL
          COLUMNS</code></a>, the privileges are all in one column and in
          lowercase, for example,
          <code class="literal">select,insert,update,references</code>. In
          <a class="link" href="information-schema.html#column-privileges-table" title="25.7 The INFORMATION_SCHEMA COLUMN_PRIVILEGES Table"><code class="literal">COLUMN_PRIVILEGES</code></a>, there is one
          privilege per row, in uppercase.
        </p></li><li class="listitem"><p>
          <code class="literal">IS_GRANTABLE</code>
        </p><p>
          <code class="literal">YES</code> if the user has the
          <a class="link" href="security.html#priv_grant-option"><code class="literal">GRANT OPTION</code></a> privilege,
          <code class="literal">NO</code> otherwise. The output does not list
          <a class="link" href="security.html#priv_grant-option"><code class="literal">GRANT OPTION</code></a> as a separate row
          with <code class="literal">PRIVILEGE_TYPE='GRANT OPTION'</code>.
</p></li></ul>
</div>
<h3><a name="idm140091570478496"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The <a class="link" href="information-schema.html#column-privileges-table" title="25.7 The INFORMATION_SCHEMA COLUMN_PRIVILEGES Table"><code class="literal">COLUMN_PRIVILEGES</code></a> table is a
          nonstandard <code class="literal">INFORMATION_SCHEMA</code> table.
</p></li></ul>
</div>
<p>
      The following statements are <span class="emphasis"><em>not</em></span> equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT ... FROM INFORMATION_SCHEMA.COLUMN_PRIVILEGES

SHOW GRANTS ...
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="column-statistics-table"></a>25.8 The INFORMATION_SCHEMA COLUMN_STATISTICS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091570471536"></a><p>
      The <a class="link" href="information-schema.html#column-statistics-table" title="25.8 The INFORMATION_SCHEMA COLUMN_STATISTICS Table"><code class="literal">COLUMN_STATISTICS</code></a> table provides
      access to histogram statistics for column values.
    </p><p>
      For information about histogram statistics, see
      <a class="xref" href="optimization.html#optimizer-statistics" title="8.9.6 Optimizer Statistics">Section 8.9.6, “Optimizer Statistics”</a>, and
      <a class="xref" href="sql-syntax.html#analyze-table" title="13.7.3.1 ANALYZE TABLE Syntax">Section 13.7.3.1, “ANALYZE TABLE Syntax”</a>.
    </p><p>
      You can see information only for columns for which you have some
      privilege.
    </p><p>
      The <a class="link" href="information-schema.html#column-statistics-table" title="25.8 The INFORMATION_SCHEMA COLUMN_STATISTICS Table"><code class="literal">COLUMN_STATISTICS</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">SCHEMA_NAME</code>
        </p><p>
          The names of the schema for which the statistics apply.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The names of the column for which the statistics apply.
        </p></li><li class="listitem"><p>
          <code class="literal">COLUMN_NAME</code>
        </p><p>
          The names of the column for which the statistics apply.
        </p></li><li class="listitem"><p>
          <code class="literal">HISTOGRAM</code>
        </p><p>
          A <a class="link" href="data-types.html#json" title="11.6 The JSON Data Type"><code class="literal">JSON</code></a> object describing the
          column statistics, stored as a histogram.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="engines-table"></a>25.9 The INFORMATION_SCHEMA ENGINES Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091570453808"></a><p>
      The <a class="link" href="information-schema.html#engines-table" title="25.9 The INFORMATION_SCHEMA ENGINES Table"><code class="literal">ENGINES</code></a> table provides
      information about storage engines. This is particularly useful for
      checking whether a storage engine is supported, or to see what the
      default engine is.
    </p><p>
      The <a class="link" href="information-schema.html#engines-table" title="25.9 The INFORMATION_SCHEMA ENGINES Table"><code class="literal">ENGINES</code></a> table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">ENGINE</code>
        </p><p>
          The name of the storage engine.
        </p></li><li class="listitem"><p>
          <code class="literal">SUPPORT</code>
        </p><p>
          The server's level of support for the storage engine, as shown
          in the following table.
</p>
<div class="informaltable">
<table summary="Values for the SUPPORT column in the INFORMATION_SCHEMA.ENGINES table."><col width="15%"><col width="85%"><thead><tr>
              <th scope="col">Value</th>
              <th scope="col">Meaning</th>
            </tr></thead><tbody><tr>
              <td scope="row"><code class="literal">YES</code></td>
              <td>The engine is supported and is active</td>
            </tr><tr>
              <td scope="row"><code class="literal">DEFAULT</code></td>
              <td>Like <code class="literal">YES</code>, plus this is the default engine</td>
            </tr><tr>
              <td scope="row"><code class="literal">NO</code></td>
              <td>The engine is not supported</td>
            </tr><tr>
              <td scope="row"><code class="literal">DISABLED</code></td>
              <td>The engine is supported but has been disabled</td>
</tr></tbody></table>
</div>
<p>
          A value of <code class="literal">NO</code> means that the server was
          compiled without support for the engine, so it cannot be
          enabled at runtime.
        </p><p>
          A value of <code class="literal">DISABLED</code> occurs either because
          the server was started with an option that disables the
          engine, or because not all options required to enable it were
          given. In the latter case, the error log should contain a
          reason indicating why the option is disabled. See
          <a class="xref" href="server-administration.html#error-log" title="5.4.2 The Error Log">Section 5.4.2, “The Error Log”</a>.
        </p><p>
          You might also see <code class="literal">DISABLED</code> for a storage
          engine if the server was compiled to support it, but was
          started with a
          <code class="option">--skip-<em class="replaceable"><code>engine_name</code></em></code>
          option. For the <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> storage
          engine, <code class="literal">DISABLED</code> means the server was
          compiled with support for NDB Cluster, but was not started
          with the <a class="link" href="mysql-cluster.html#option_mysqld_ndbcluster"><code class="option">--ndbcluster</code></a> option.
        </p><p>
          All MySQL servers support <code class="literal">MyISAM</code> tables. It
          is not possible to disable <code class="literal">MyISAM</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">COMMENT</code>
        </p><p>
          A brief description of the storage engine.
        </p></li><li class="listitem"><p>
          <code class="literal">TRANSACTIONS</code>
        </p><p>
          Whether the storage engine supports transactions.
        </p></li><li class="listitem"><p>
          <code class="literal">XA</code>
        </p><p>
          Whether the storage engine supports XA transactions.
        </p></li><li class="listitem"><p>
          <code class="literal">SAVEPOINTS</code>
        </p><p>
          Whether the storage engine supports savepoints.
</p></li></ul>
</div>
<h3><a name="idm140091570409120"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The <a class="link" href="information-schema.html#engines-table" title="25.9 The INFORMATION_SCHEMA ENGINES Table"><code class="literal">ENGINES</code></a> table is a
          nonstandard <code class="literal">INFORMATION_SCHEMA</code> table.
</p></li></ul>
</div>
<p>
      Storage engine information is also available from the
      <a class="link" href="sql-syntax.html#show-engines" title="13.7.6.16 SHOW ENGINES Syntax"><code class="literal">SHOW ENGINES</code></a> statement. See
      <a class="xref" href="sql-syntax.html#show-engines" title="13.7.6.16 SHOW ENGINES Syntax">Section 13.7.6.16, “SHOW ENGINES Syntax”</a>. The following statements are
      equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT * FROM INFORMATION_SCHEMA.ENGINES

SHOW ENGINES
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="events-table"></a>25.10 The INFORMATION_SCHEMA EVENTS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091570400688"></a><p>
      The <a class="link" href="information-schema.html#events-table" title="25.10 The INFORMATION_SCHEMA EVENTS Table"><code class="literal">EVENTS</code></a> table provides information
      about Event Manager events, which are discussed in
      <a class="xref" href="stored-objects.html#event-scheduler" title="24.4 Using the Event Scheduler">Section 24.4, “Using the Event Scheduler”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#events-table" title="25.10 The INFORMATION_SCHEMA EVENTS Table"><code class="literal">EVENTS</code></a> table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">EVENT_CATALOG</code>
        </p><p>
          The name of the catalog to which the event belongs. This value
          is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">EVENT_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the event belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">EVENT_NAME</code>
        </p><p>
          The name of the event.
        </p></li><li class="listitem"><p>
          <code class="literal">DEFINER</code>
        </p><p>
          The account of the user who created the event, in
          <code class="literal">'<em class="replaceable"><code>user_name</code></em>'@'<em class="replaceable"><code>host_name</code></em>'</code>
          format.
        </p></li><li class="listitem"><p>
          <code class="literal">TIME_ZONE</code>
        </p><p>
          The event time zone, which is the time zone used for
          scheduling the event and that is in effect within the event as
          it executes. The default value is <code class="literal">SYSTEM</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">EVENT_BODY</code>
        </p><p>
          The language used for the statements in the event's
          <a class="link" href="sql-syntax.html#do" title="13.2.3 DO Syntax"><code class="literal">DO</code></a> clause. The value is always
          <code class="literal">SQL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">EVENT_DEFINITION</code>
        </p><p>
          The text of the SQL statement making up the event's
          <a class="link" href="sql-syntax.html#do" title="13.2.3 DO Syntax"><code class="literal">DO</code></a> clause; in other words, the
          statement executed by this event.
        </p></li><li class="listitem"><p>
          <code class="literal">EVENT_TYPE</code>
        </p><p>
          The event repetition type, either <code class="literal">ONE TIME</code>
          (transient) or <code class="literal">RECURRING</code> (repeating).
        </p></li><li class="listitem"><p>
          <code class="literal">EXECUTE_AT</code>
        </p><p>
          For a one-time event, this is the
          <a class="link" href="data-types.html#datetime" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">DATETIME</code></a> value specified in the
          <code class="literal">AT</code> clause of the
          <a class="link" href="sql-syntax.html#create-event" title="13.1.13 CREATE EVENT Syntax"><code class="literal">CREATE EVENT</code></a> statement used to
          create the event, or of the last <a class="link" href="sql-syntax.html#alter-event" title="13.1.3 ALTER EVENT Syntax"><code class="literal">ALTER
          EVENT</code></a> statement that modified the event. The value
          shown in this column reflects the addition or subtraction of
          any <code class="literal">INTERVAL</code> value included in the event's
          <code class="literal">AT</code> clause. For example, if an event is
          created using <code class="literal">ON SCHEDULE AT CURRENT_TIMESTAMP +
          '1:6' DAY_HOUR</code>, and the event was created at
          2018-02-09 14:05:30, the value shown in this column would be
          <code class="literal">'2018-02-10 20:05:30'</code>. If the event's
          timing is determined by an <code class="literal">EVERY</code> clause
          instead of an <code class="literal">AT</code> clause (that is, if the
          event is recurring), the value of this column is
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">INTERVAL_VALUE</code>
        </p><p>
          For a recurring event, the number of intervals to wait between
          event executions. For a transient event, the value is always
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">INTERVAL_FIELD</code>
        </p><p>
          The time units used for the interval which a recurring event
          waits before repeating. For a transient event, the value is
          always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">SQL_MODE</code>
        </p><p>
          The SQL mode in effect when the event was created or altered,
          and under which the event executes. For the permitted values,
          see <a class="xref" href="server-administration.html#sql-mode" title="5.1.11 Server SQL Modes">Section 5.1.11, “Server SQL Modes”</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">STARTS</code>
        </p><p>
          The start date and time for a recurring event. This is
          displayed as a <a class="link" href="data-types.html#datetime" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">DATETIME</code></a> value,
          and is <code class="literal">NULL</code> if no start date and time are
          defined for the event. For a transient event, this column is
          always <code class="literal">NULL</code>. For a recurring event whose
          definition includes a <code class="literal">STARTS</code> clause, this
          column contains the corresponding
          <a class="link" href="data-types.html#datetime" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">DATETIME</code></a> value. As with the
          <code class="literal">EXECUTE_AT</code> column, this value resolves any
          expressions used. If there is no <code class="literal">STARTS</code>
          clause affecting the timing of the event, this column is
          <code class="literal">NULL</code>
        </p></li><li class="listitem"><p>
          <code class="literal">ENDS</code>
        </p><p>
          For a recurring event whose definition includes a
          <code class="literal">ENDS</code> clause, this column contains the
          corresponding <a class="link" href="data-types.html#datetime" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">DATETIME</code></a> value.
          As with the <code class="literal">EXECUTE_AT</code> column, this value
          resolves any expressions used. If there is no
          <code class="literal">ENDS</code> clause affecting the timing of the
          event, this column is <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">STATUS</code>
        </p><p>
          The event status. One of <code class="literal">ENABLED</code>,
          <code class="literal">DISABLED</code>, or
          <code class="literal">SLAVESIDE_DISABLED</code>.
          <code class="literal">SLAVESIDE_DISABLED</code> indicates that the
          creation of the event occurred on another MySQL server acting
          as a replication master and replicated to the current MySQL
          server which is acting as a slave, but the event is not
          presently being executed on the slave. For more information,
          see <a class="xref" href="replication.html#replication-features-invoked" title="17.4.1.16 Replication of Invoked Features">Section 17.4.1.16, “Replication of Invoked Features”</a>.
          information.
        </p></li><li class="listitem"><p>
          <code class="literal">ON_COMPLETION</code>
        </p><p>
          One of the two values <code class="literal">PRESERVE</code> or
          <code class="literal">NOT PRESERVE</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">CREATED</code>
        </p><p>
          The date and time when the event was created. This is a
          <a class="link" href="data-types.html#datetime" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">TIMESTAMP</code></a> value.
        </p></li><li class="listitem"><p>
          <code class="literal">LAST_ALTERED</code>
        </p><p>
          The date and time when the event was last modified. This is a
          <a class="link" href="data-types.html#datetime" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">TIMESTAMP</code></a> value. If the event
          has not been modified since its creation, this value is the
          same as the <code class="literal">CREATED</code> value.
        </p></li><li class="listitem"><p>
          <code class="literal">LAST_EXECUTED</code>
        </p><p>
          The date and time when the event last executed. This is a
          <a class="link" href="data-types.html#datetime" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">DATETIME</code></a> value. If the event
          has never executed, this column is <code class="literal">NULL</code>.
        </p><p>
          <code class="literal">LAST_EXECUTED</code> indicates when the event
          started. As a result, the <code class="literal">ENDS</code> column is
          never less than <code class="literal">LAST_EXECUTED</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">EVENT_COMMENT</code>
        </p><p>
          The text of the comment, if the event has one. If not, this
          value is empty.
        </p></li><li class="listitem"><p>
          <code class="literal">ORIGINATOR</code>
        </p><p>
          The server ID of the MySQL server on which the event was
          created; used in replication. This value may be updated by
          <a class="link" href="sql-syntax.html#alter-event" title="13.1.3 ALTER EVENT Syntax"><code class="literal">ALTER EVENT</code></a> to the server ID of
          the server on which that statement occurs, if executed on a
          master server. The default value is 0.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_SET_CLIENT</code>
        </p><p>
          The session value of the
          <a class="link" href="server-administration.html#sysvar_character_set_client"><code class="literal">character_set_client</code></a> system
          variable when the event was created.
        </p></li><li class="listitem"><p>
          <code class="literal">COLLATION_CONNECTION</code>
        </p><p>
          The session value of the
          <a class="link" href="server-administration.html#sysvar_collation_connection"><code class="literal">collation_connection</code></a> system
          variable when the event was created.
        </p></li><li class="listitem"><p>
          <code class="literal">DATABASE_COLLATION</code>
        </p><p>
          The collation of the database with which the event is
          associated.
</p></li></ul>
</div>
<h3><a name="idm140091570299936"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The <a class="link" href="information-schema.html#events-table" title="25.10 The INFORMATION_SCHEMA EVENTS Table"><code class="literal">EVENTS</code></a> table is a nonstandard
          <code class="literal">INFORMATION_SCHEMA</code> table.
        </p></li><li class="listitem"><p>
          Times in the <a class="link" href="information-schema.html#events-table" title="25.10 The INFORMATION_SCHEMA EVENTS Table"><code class="literal">EVENTS</code></a> table are
          displayed using the event time zone or the current session
          time zone, as described in <a class="xref" href="stored-objects.html#events-metadata" title="24.4.4 Event Metadata">Section 24.4.4, “Event Metadata”</a>.
        </p></li><li class="listitem"><p>
          For more information about
          <code class="literal">SLAVESIDE_DISABLED</code> and the
          <code class="literal">ORIGINATOR</code> column, see
          <a class="xref" href="replication.html#replication-features-invoked" title="17.4.1.16 Replication of Invoked Features">Section 17.4.1.16, “Replication of Invoked Features”</a>.
</p></li></ul>
</div>
<h3><a name="idm140091570290304"></a>Example</h3>
<p>
      Suppose that the user <code class="literal">'jon'@'ghidora'</code> creates
      an event named <code class="literal">e_daily</code>, and then modifies it a
      few minutes later using an <a class="link" href="sql-syntax.html#alter-event" title="13.1.3 ALTER EVENT Syntax"><code class="literal">ALTER
      EVENT</code></a> statement, as shown here:
    </p><pre data-lang="sql" class="programlisting">
DELIMITER |

CREATE EVENT e_daily
    ON SCHEDULE
      EVERY 1 DAY
    COMMENT 'Saves total number of sessions then clears the table each day'
    DO
      BEGIN
        INSERT INTO site_activity.totals (time, total)
          SELECT CURRENT_TIMESTAMP, COUNT(*)
            FROM site_activity.sessions;
        DELETE FROM site_activity.sessions;
      END |

DELIMITER ;

ALTER EVENT e_daily
    ENABLE;
</pre><p>
      (Note that comments can span multiple lines.)
    </p><p>
      This user can then run the following
      <a class="link" href="sql-syntax.html#select" title="13.2.10 SELECT Syntax"><code class="literal">SELECT</code></a> statement, and obtain the
      output shown:
    </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.EVENTS</code></strong>
       <strong class="userinput"><code>WHERE EVENT_NAME = 'e_daily'</code></strong>
       <strong class="userinput"><code>AND EVENT_SCHEMA = 'myschema'\G</code></strong>
*************************** 1. row ***************************
       EVENT_CATALOG: def
        EVENT_SCHEMA: myschema
          EVENT_NAME: e_daily
             DEFINER: jon@ghidora
           TIME_ZONE: SYSTEM
          EVENT_BODY: SQL
    EVENT_DEFINITION: BEGIN
        INSERT INTO site_activity.totals (time, total)
          SELECT CURRENT_TIMESTAMP, COUNT(*)
            FROM site_activity.sessions;
        DELETE FROM site_activity.sessions;
      END
          EVENT_TYPE: RECURRING
          EXECUTE_AT: NULL
      INTERVAL_VALUE: 1
      INTERVAL_FIELD: DAY
            SQL_MODE: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,
                      NO_ZERO_IN_DATE,NO_ZERO_DATE,
                      ERROR_FOR_DIVISION_BY_ZERO,
                      NO_ENGINE_SUBSTITUTION
              STARTS: 2018-08-08 11:06:34
                ENDS: NULL
              STATUS: ENABLED
       ON_COMPLETION: NOT PRESERVE
             CREATED: 2018-08-08 11:06:34
        LAST_ALTERED: 2018-08-08 11:06:34
       LAST_EXECUTED: 2018-08-08 16:06:34
       EVENT_COMMENT: Saves total number of sessions then clears the
                      table each day
          ORIGINATOR: 1
CHARACTER_SET_CLIENT: utf8mb4
COLLATION_CONNECTION: utf8mb4_0900_ai_ci
  DATABASE_COLLATION: utf8mb4_0900_ai_ci
</pre><p>
      Event information is also available from the
      <a class="link" href="sql-syntax.html#show-events" title="13.7.6.18 SHOW EVENTS Syntax"><code class="literal">SHOW EVENTS</code></a> statement. See
      <a class="xref" href="sql-syntax.html#show-events" title="13.7.6.18 SHOW EVENTS Syntax">Section 13.7.6.18, “SHOW EVENTS Syntax”</a>. The following statements are
      equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT
    EVENT_SCHEMA, EVENT_NAME, DEFINER, TIME_ZONE, EVENT_TYPE, EXECUTE_AT,
    INTERVAL_VALUE, INTERVAL_FIELD, STARTS, ENDS, STATUS, ORIGINATOR,
    CHARACTER_SET_CLIENT, COLLATION_CONNECTION, DATABASE_COLLATION
  FROM INFORMATION_SCHEMA.EVENTS
  WHERE table_schema = '<em class="replaceable"><code>db_name</code></em>'
  [AND column_name LIKE '<em class="replaceable"><code>wild</code></em>']

SHOW EVENTS
  [FROM <em class="replaceable"><code>db_name</code></em>]
  [LIKE '<em class="replaceable"><code>wild</code></em>']
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="files-table"></a>25.11 The INFORMATION_SCHEMA FILES Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091570271648"></a><a class="indexterm" name="idm140091570270176"></a><p>
      The <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> table provides information
      about the files in which MySQL tablespace data is stored.
    </p><p>
      The <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> table provides information
      about <code class="literal">InnoDB</code> data files. In NDB Cluster, this
      table also provides information about the files in which NDB
      Cluster Disk Data tables are stored. For additional information
      specific to <code class="literal">InnoDB</code>, see
      <a class="xref" href="information-schema.html#files-table-innodb-notes" title="InnoDB Notes">InnoDB Notes</a>, later in this section;
      for additional information specific to NDB Cluster, see
      <a class="xref" href="information-schema.html#files-table-ndb-notes" title="NDB Notes">NDB Notes</a>.
    </p><p>
      The <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">FILE_ID</code>
        </p><p>
          For <code class="literal">InnoDB</code>: The tablespace ID, also
          referred to as the <code class="literal">space_id</code> or
          <code class="literal">fil_space_t::id</code>.
        </p><p>
          For <code class="literal">NDB</code>: A file identifier.
          <code class="literal">FILE_ID</code> column values are auto-generated.
        </p></li><li class="listitem"><p>
          <code class="literal">FILE_NAME</code>
        </p><p>
          For <code class="literal">InnoDB</code>: The name of the data file.
          File-per-table and general tablespaces have an
          <code class="filename">.ibd</code> file name extension. Undo
          tablespaces are prefixed by <code class="literal">undo</code>. The
          system tablespace is prefixed by <code class="literal">ibdata</code>.
          The global temporary tablespace is prefixed by
          <code class="literal">ibtmp</code>. The file name includes the file
          path, which may be relative to the MySQL data directory (the
          value of the <a class="link" href="server-administration.html#sysvar_datadir"><code class="literal">datadir</code></a> system
          variable).
        </p><p>
          For <code class="literal">NDB</code>: The name of an
          <code class="literal">UNDO</code> log file created by
          <a class="link" href="sql-syntax.html#create-logfile-group" title="13.1.16 CREATE LOGFILE GROUP Syntax"><code class="literal">CREATE LOGFILE GROUP</code></a> or
          <a class="link" href="sql-syntax.html#alter-logfile-group" title="13.1.6 ALTER LOGFILE GROUP Syntax"><code class="literal">ALTER LOGFILE GROUP</code></a>, or of a
          data file created by <a class="link" href="sql-syntax.html#create-tablespace" title="13.1.21 CREATE TABLESPACE Syntax"><code class="literal">CREATE
          TABLESPACE</code></a> or <a class="link" href="sql-syntax.html#alter-tablespace" title="13.1.10 ALTER TABLESPACE Syntax"><code class="literal">ALTER
          TABLESPACE</code></a>.
        </p></li><li class="listitem"><p>
          <code class="literal">FILE_TYPE</code>
        </p><p>
          For <code class="literal">InnoDB</code>: The tablespace file type. There
          are three possible file types for <code class="literal">InnoDB</code>
          files. <code class="literal">TABLESPACE</code> is the file type for any
          system, general, or file-per-table tablespace file that holds
          tables, indexes, or other forms of user data.
          <code class="literal">TEMPORARY</code> is the file type for temporary
          tablespaces. <code class="literal">UNDO LOG</code> is the file type for
          undo tablespaces, which hold undo records.
        </p><p>
          For <code class="literal">NDB</code>: One of the values <code class="literal">UNDO
          LOG</code>, <code class="literal">DATAFILE</code>, or
          <code class="literal">TABLESPACE</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLESPACE_NAME</code>
        </p><p>
          For <code class="literal">InnoDB</code>: The SQL name for the
          tablespace. A general tablespace name is the
          <code class="literal">SYS_TABLESPACES.NAME</code> value. For other
          tablespace files, names start with <code class="literal">innodb_</code>,
          such as <code class="literal">innodb_system</code>,
          <code class="literal">innodb_undo</code>, and
          <code class="literal">innodb_file_per_table</code>. The file-per-table
          tablespace name format is
          <code class="literal">innodb_file_per_table_<em class="replaceable"><code>##</code></em></code>,
          where <em class="replaceable"><code>##</code></em> is the tablespace ID.
        </p><p>
          For <code class="literal">NDB</code>: The name of the tablespace with
          which the file is associated.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_CATALOG</code>
        </p><p>
          This value is always empty.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_SCHEMA</code>
        </p><p>
          This value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: The name of the Disk Data table
          with which the file is associated, if any.
        </p></li><li class="listitem"><p>
          <code class="literal">LOGFILE_GROUP_NAME</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: The name of the log file group to
          which the log file or data file belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">LOGFILE_GROUP_NUMBER</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For an <code class="literal">UNDO</code> log
          file, the auto-generated ID number of the log file group to
          which the log file belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">ENGINE</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">InnoDB</code>.
        </p><p>
          For <code class="literal">NDB</code>: For an NDB Cluster Disk Data log
          file or data file, this value is always <code class="literal">NDB</code>
          or <code class="literal">NDBCLUSTER</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">FULLTEXT_KEYS</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For an NDB Cluster Disk Data log
          file or data file, this value is always empty.
        </p></li><li class="listitem"><p>
          <code class="literal">DELETED_ROWS</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">UPDATE_COUNT</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">FREE_EXTENTS</code>
        </p><p>
          For <code class="literal">InnoDB</code>: The number of fully free
          extents in the current data file.
        </p><p>
          For <code class="literal">NDB</code>: The number of extents which have
          not yet been used by the file.
        </p></li><li class="listitem"><p>
          <code class="literal">TOTAL_EXTENTS</code>
        </p><p>
          For <code class="literal">InnoDB</code>: The number of full extents used
          in the current data file. Any partial extent at the end of the
          file is not counted.
        </p><p>
          For <code class="literal">NDB</code>: The total number of extents
          allocated to the file.
        </p></li><li class="listitem"><p>
          <code class="literal">EXTENT_SIZE</code>
        </p><p>
          For <code class="literal">InnoDB</code>: Extent size is 1048576 (1MB)
          for files with a 4KB, 8KB, or 16KB page size. Extent size is
          2097152 bytes (2MB) for files with a 32KB page size, and
          4194304 (4MB) for files with a 64KB page size.
          <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> does not report
          <code class="literal">InnoDB</code> page size. Page size is defined by
          the <a class="link" href="innodb-storage-engine.html#sysvar_innodb_page_size"><code class="literal">innodb_page_size</code></a> system
          variable. Extent size information can also be retrieved from
          the <a class="link" href="information-schema.html#innodb-tablespaces-table" title="25.39.25 The INFORMATION_SCHEMA INNODB_TABLESPACES Table"><code class="literal">INNODB_TABLESPACES</code></a> table
          where <code class="literal">FILES.FILE_ID =
          INNODB_TABLESPACES.SPACE</code>.
        </p><p>
          For <code class="literal">NDB</code>: The size of an extent for the file
          in bytes.
        </p></li><li class="listitem"><p>
          <code class="literal">INITIAL_SIZE</code>
        </p><p>
          For <code class="literal">InnoDB</code>: The initial size of the file in
          bytes.
        </p><p>
          For <code class="literal">NDB</code>: The size of the file in bytes.
          This is the same value that was used in the
          <code class="literal">INITIAL_SIZE</code> clause of the
          <a class="link" href="sql-syntax.html#create-logfile-group" title="13.1.16 CREATE LOGFILE GROUP Syntax"><code class="literal">CREATE LOGFILE GROUP</code></a>,
          <a class="link" href="sql-syntax.html#alter-logfile-group" title="13.1.6 ALTER LOGFILE GROUP Syntax"><code class="literal">ALTER LOGFILE GROUP</code></a>,
          <a class="link" href="sql-syntax.html#create-tablespace" title="13.1.21 CREATE TABLESPACE Syntax"><code class="literal">CREATE TABLESPACE</code></a>, or
          <a class="link" href="sql-syntax.html#alter-tablespace" title="13.1.10 ALTER TABLESPACE Syntax"><code class="literal">ALTER TABLESPACE</code></a> statement used
          to create the file.
        </p></li><li class="listitem"><p>
          <code class="literal">MAXIMUM_SIZE</code>
        </p><p>
          For <code class="literal">InnoDB</code>: The maximum number of bytes
          permitted in the file. The value is <code class="literal">NULL</code>
          for all data files except for predefined system tablespace
          data files. Maximum system tablespace file size is defined by
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_data_file_path"><code class="literal">innodb_data_file_path</code></a>.
          Maximum global temporary tablespace file size is defined by
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_temp_data_file_path"><code class="literal">innodb_temp_data_file_path</code></a>. A
          <code class="literal">NULL</code> value for a predefined system
          tablespace data file indicates that a file size limit was not
          defined explicitly.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always the same as the
          <code class="literal">INITIAL_SIZE</code> value.
        </p></li><li class="listitem"><p>
          <code class="literal">AUTOEXTEND_SIZE</code>
        </p><p>
          For <code class="literal">InnoDB</code>:
          <code class="literal">AUTOEXTEND_SIZE</code> is the auto-extend size
          defined by
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_data_file_path"><code class="literal">innodb_data_file_path</code></a> for the
          system tablespace, or by
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_temp_data_file_path"><code class="literal">innodb_temp_data_file_path</code></a>
          for the global temporary tablespace.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always empty.
        </p></li><li class="listitem"><p>
          <code class="literal">CREATION_TIME</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: The date and time when the file
          was created.
        </p></li><li class="listitem"><p>
          <code class="literal">LAST_UPDATE_TIME</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: The date and time when the file
          was last modified.
        </p></li><li class="listitem"><p>
          <code class="literal">LAST_ACCESS_TIME</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: The date and time when the file
          was last accessed by the server.
        </p></li><li class="listitem"><p>
          <code class="literal">RECOVER_TIME</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">0</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TRANSACTION_COUNTER</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">0</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">VERSION</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">ROW_FORMAT</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_ROWS</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">AVG_ROW_LENGTH</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">DATA_LENGTH</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">MAX_DATA_LENGTH</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">INDEX_LENGTH</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">DATA_FREE</code>
        </p><p>
          For <code class="literal">InnoDB</code>: The total amount of free space
          (in bytes) for the entire tablespace. Predefined system
          tablespaces, which include the system tablespace and temporary
          table tablespaces, may have one or more data files.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">CREATE_TIME</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">UPDATE_TIME</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">CHECK_TIME</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">CHECKSUM</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">STATUS</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is
          <code class="literal">NORMAL</code> by default.
          <code class="literal">InnoDB</code> file-per-table tablespaces may
          report <code class="literal">IMPORTING</code>, which indicates that the
          tablespace is not yet available.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          this value is always <code class="literal">NORMAL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">EXTRA</code>
        </p><p>
          For <code class="literal">InnoDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: For NDB Cluster Disk Data files,
          the <code class="literal">EXTRA</code> column shows which data node the
          file belongs to (each data node having its own copy), as well
          as the size of its undo buffer. Suppose that you use this
          statement on an NDB Cluster with four data nodes:
        </p><pre data-lang="sql" class="programlisting">
CREATE LOGFILE GROUP mygroup
    ADD UNDOFILE 'new_undo.dat'
    INITIAL_SIZE 2G
    ENGINE NDB;
</pre><p>
          After running the <a class="link" href="sql-syntax.html#create-logfile-group" title="13.1.16 CREATE LOGFILE GROUP Syntax"><code class="literal">CREATE LOGFILE
          GROUP</code></a> statement successfully, you should see a
          result similar to the one shown here for this query against
          the <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> table:
        </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT LOGFILE_GROUP_NAME, FILE_TYPE, EXTRA</code></strong>
         <strong class="userinput"><code>FROM INFORMATION_SCHEMA.FILES</code></strong>
         <strong class="userinput"><code>WHERE FILE_NAME = 'new_undo.dat';</code></strong>

+--------------------+-----------+-----------------------------------------+
| LOGFILE_GROUP_NAME | FILE_TYPE | EXTRA                                   |
+--------------------+-----------+-----------------------------------------+
| mygroup            | UNDO LOG  | CLUSTER_NODE=5;UNDO_BUFFER_SIZE=8388608 |
| mygroup            | UNDO LOG  | CLUSTER_NODE=6;UNDO_BUFFER_SIZE=8388608 |
| mygroup            | UNDO LOG  | CLUSTER_NODE=7;UNDO_BUFFER_SIZE=8388608 |
| mygroup            | UNDO LOG  | CLUSTER_NODE=8;UNDO_BUFFER_SIZE=8388608 |
+--------------------+-----------+-----------------------------------------+
</pre><p>
          This information was not included in NDB Cluster 8.0 prior to
          NDB 8.0.15. (Bug #92796, Bug #28800252)
</p></li></ul>
</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h3 class="title"><a name="files-table-notes"></a>Notes</h3>

</div>

</div>

</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            The <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> table is a
            nonstandard <code class="literal">INFORMATION_SCHEMA</code> table.
</p></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h3 class="title"><a name="files-table-innodb-notes"></a>InnoDB Notes</h3>

</div>

</div>

</div>
<p>
        The following notes apply to <code class="literal">InnoDB</code> data
        files.
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            Data reported by <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> is
            reported from the <code class="literal">InnoDB</code> in-memory cache
            for open files. By comparison,
            <a class="link" href="information-schema.html#innodb-datafiles-table" title="25.39.9 The INFORMATION_SCHEMA INNODB_DATAFILES Table"><code class="literal">INNODB_DATAFILES</code></a> reports data
            from the <code class="literal">InnoDB</code>
            <code class="literal">SYS_DATAFILES</code> internal data dictionary
            table.
          </p></li><li class="listitem"><p>
            The data reported by <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a>
            includes global temporary tablespace data. This data is not
            available in the <code class="literal">InnoDB</code>
            <code class="literal">SYS_DATAFILES</code> internal data dictionary
            table, and is therefore not reported by
            <a class="link" href="information-schema.html#innodb-datafiles-table" title="25.39.9 The INFORMATION_SCHEMA INNODB_DATAFILES Table"><code class="literal">INNODB_DATAFILES</code></a>.
          </p></li><li class="listitem"><p>
            Undo tablespace data is reported by
            <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> when separate undo
            tablespaces are present, which they are by default in MySQL
            8.0
          </p></li><li class="listitem"><p>
            The following query returns all data pertinent to
            <code class="literal">InnoDB</code> tablespaces.
          </p><pre data-lang="sql" class="programlisting">
SELECT
  FILE_ID, FILE_NAME, FILE_TYPE, TABLESPACE_NAME, FREE_EXTENTS,
  TOTAL_EXTENTS, EXTENT_SIZE, INITIAL_SIZE, MAXIMUM_SIZE,
  AUTOEXTEND_SIZE, DATA_FREE, STATUS
FROM INFORMATION_SCHEMA.FILES WHERE ENGINE='InnoDB'\G
</pre></li></ul>
</div>

</div>
<div class="simplesect">
<div class="titlepage">
<div>
<div class="simple">
<h3 class="title"><a name="files-table-ndb-notes"></a>NDB Notes</h3>

</div>

</div>

</div>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            The <code class="literal">FILES</code> table provides information
            about Disk Data <span class="emphasis"><em>files</em></span> only; you cannot
            use it for determining disk space allocation or availability
            for individual <code class="literal">NDB</code> tables. However, it is
            possible to see how much space is allocated for each
            <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> table having data stored on
            disk—as well as how much remains available for storage
            of data on disk for that table—using
            <a class="link" href="mysql-cluster.html#mysql-cluster-programs-ndb-desc" title="22.4.9 ndb_desc — Describe NDB Tables"><span class="command"><strong>ndb_desc</strong></span></a>. For more information, see
            <a class="xref" href="mysql-cluster.html#mysql-cluster-programs-ndb-desc" title="22.4.9 ndb_desc — Describe NDB Tables">Section 22.4.9, “<span class="command"><strong>ndb_desc</strong></span> — Describe NDB Tables”</a>.
          </p></li><li class="listitem"><p>
            The <code class="literal">CREATION_TIME</code>,
            <code class="literal">LAST_UPDATE_TIME</code>, and
            <code class="literal">LAST_ACCESSED</code> values are as reported by
            the operating system, and are not supplied by the
            <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> storage engine. Where no
            value is provided by the operating system, these columns
            display <code class="literal">0000-00-00 00:00:00</code>.
          </p></li><li class="listitem"><p>
            The difference between the <code class="literal">TOTAL EXTENTS</code>
            and <code class="literal">FREE_EXTENTS</code> columns is the number of
            extents currently in use by the file:
          </p><pre data-lang="sql" class="programlisting">
SELECT TOTAL_EXTENTS - FREE_EXTENTS AS extents_used
    FROM INFORMATION_SCHEMA.FILES
    WHERE FILE_NAME = 'myfile.dat';
</pre><p>
            To approximate the amount of disk space in use by the file,
            multiply that difference by the value of the
            <code class="literal">EXTENT_SIZE</code> column, which gives the size
            of an extent for the file in bytes:
          </p><pre data-lang="sql" class="programlisting">
SELECT (TOTAL_EXTENTS - FREE_EXTENTS) * EXTENT_SIZE AS bytes_used
    FROM INFORMATION_SCHEMA.FILES
    WHERE FILE_NAME = 'myfile.dat';
</pre><p>
            Similarly, you can estimate the amount of space that remains
            available in a given file by multiplying
            <code class="literal">FREE_EXTENTS</code> by
            <code class="literal">EXTENT_SIZE</code>:
          </p><pre data-lang="sql" class="programlisting">
SELECT FREE_EXTENTS * EXTENT_SIZE AS bytes_free
    FROM INFORMATION_SCHEMA.FILES
    WHERE FILE_NAME = 'myfile.dat';
</pre>
<div class="important" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Important
</div>
<p>
              The byte values produced by the preceding queries are
              approximations only, and their precision is inversely
              proportional to the value of
              <code class="literal">EXTENT_SIZE</code>. That is, the larger
              <code class="literal">EXTENT_SIZE</code> becomes, the less accurate
              the approximations are.
</p>
</div>
<p>
            It is also important to remember that once an extent is
            used, it cannot be freed again without dropping the data
            file of which it is a part. This means that deletes from a
            Disk Data table do <span class="emphasis"><em>not</em></span> release disk
            space.
          </p><p>
            The extent size can be set in a <a class="link" href="sql-syntax.html#create-tablespace" title="13.1.21 CREATE TABLESPACE Syntax"><code class="literal">CREATE
            TABLESPACE</code></a> statement. For more information, see
            <a class="xref" href="sql-syntax.html#create-tablespace" title="13.1.21 CREATE TABLESPACE Syntax">Section 13.1.21, “CREATE TABLESPACE Syntax”</a>.
          </p></li><li class="listitem"><p>
            An additional row is present in the
            <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> table following the
            creation of a logfile group. This row has
            <code class="literal">NULL</code> for the value of the
            <code class="literal">FILE_NAME</code> column. For this row, the value
            of the <code class="literal">FILE_ID</code> column is always
            <code class="literal">0</code>, that of the
            <code class="literal">FILE_TYPE</code> column is always <code class="literal">UNDO
            FILE</code>, and that of the <code class="literal">STATUS</code>
            column is always <code class="literal">NORMAL</code>. The value of the
            <code class="literal">ENGINE</code> column is always
            <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDBCLUSTER</code></a>.
          </p><p>
            The <code class="literal">FREE_EXTENTS</code> column in this row shows
            the total number of free extents available to all undo files
            belonging to a given log file group whose name and number
            are shown in the <code class="literal">LOGFILE_GROUP_NAME</code> and
            <code class="literal">LOGFILE_GROUP_NUMBER</code> columns,
            respectively.
          </p><p>
            Suppose there are no existing log file groups on your NDB
            Cluster, and you create one using the following statement:
          </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>CREATE LOGFILE GROUP lg1</code></strong>
         <strong class="userinput"><code>ADD UNDOFILE 'undofile.dat'</code></strong>
         <strong class="userinput"><code>INITIAL_SIZE = 16M</code></strong>
         <strong class="userinput"><code>UNDO_BUFFER_SIZE = 1M</code></strong>
         <strong class="userinput"><code>ENGINE = NDB;</code></strong>
</pre><p>
            You can now see this <code class="literal">NULL</code> row when you
            query the <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> table:
          </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT DISTINCT</code></strong>
         <strong class="userinput"><code>FILE_NAME AS File,</code></strong>
         <strong class="userinput"><code>FREE_EXTENTS AS Free,</code></strong>
         <strong class="userinput"><code>TOTAL_EXTENTS AS Total,</code></strong>
         <strong class="userinput"><code>EXTENT_SIZE AS Size,</code></strong>
         <strong class="userinput"><code>INITIAL_SIZE AS Initial</code></strong>
         <strong class="userinput"><code>FROM INFORMATION_SCHEMA.FILES;</code></strong>
+--------------+---------+---------+------+----------+
| File         | Free    | Total   | Size | Initial  |
+--------------+---------+---------+------+----------+
| undofile.dat |    NULL | 4194304 |    4 | 16777216 |
| NULL         | 4184068 |    NULL |    4 |     NULL |
+--------------+---------+---------+------+----------+
</pre><p>
            The total number of free extents available for undo logging
            is always somewhat less than the sum of the
            <code class="literal">TOTAL_EXTENTS</code> column values for all undo
            files in the log file group due to overhead required for
            maintaining the undo files. This can be seen by adding a
            second undo file to the log file group, then repeating the
            previous query against the
            <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> table:
          </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>ALTER LOGFILE GROUP lg1</code></strong>
         <strong class="userinput"><code>ADD UNDOFILE 'undofile02.dat'</code></strong>
         <strong class="userinput"><code>INITIAL_SIZE = 4M</code></strong>
         <strong class="userinput"><code>ENGINE = NDB;</code></strong>

mysql&gt; <strong class="userinput"><code>SELECT DISTINCT</code></strong>
         <strong class="userinput"><code>FILE_NAME AS File,</code></strong>
         <strong class="userinput"><code>FREE_EXTENTS AS Free,</code></strong>
         <strong class="userinput"><code>TOTAL_EXTENTS AS Total,</code></strong>
         <strong class="userinput"><code>EXTENT_SIZE AS Size,</code></strong>
         <strong class="userinput"><code>INITIAL_SIZE AS Initial</code></strong>
         <strong class="userinput"><code>FROM INFORMATION_SCHEMA.FILES;</code></strong>
+----------------+---------+---------+------+----------+
| File           | Free    | Total   | Size | Initial  |
+----------------+---------+---------+------+----------+
| undofile.dat   |    NULL | 4194304 |    4 | 16777216 |
| undofile02.dat |    NULL | 1048576 |    4 |  4194304 |
| NULL           | 5223944 |    NULL |    4 |     NULL |
+----------------+---------+---------+------+----------+
</pre><p>
            The amount of free space in bytes which is available for
            undo logging by Disk Data tables using this log file group
            can be approximated by multiplying the number of free
            extents by the initial size:
          </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT</code></strong>
         <strong class="userinput"><code>FREE_EXTENTS AS 'Free Extents',</code></strong>
         <strong class="userinput"><code>FREE_EXTENTS * EXTENT_SIZE AS 'Free Bytes'</code></strong>
         <strong class="userinput"><code>FROM INFORMATION_SCHEMA.FILES</code></strong>
         <strong class="userinput"><code>WHERE LOGFILE_GROUP_NAME = 'lg1'</code></strong>
         <strong class="userinput"><code>AND FILE_NAME IS NULL;</code></strong>
+--------------+------------+
| Free Extents | Free Bytes |
+--------------+------------+
|      5223944 |   20895776 |
+--------------+------------+
</pre><p>
            If you create an NDB Cluster Disk Data table and then insert
            some rows into it, you can see approximately how much space
            remains for undo logging afterward, for example:
          </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>CREATE TABLESPACE ts1</code></strong>
         <strong class="userinput"><code>ADD DATAFILE 'data1.dat'</code></strong>
         <strong class="userinput"><code>USE LOGFILE GROUP lg1</code></strong>
         <strong class="userinput"><code>INITIAL_SIZE 512M</code></strong>
         <strong class="userinput"><code>ENGINE = NDB;</code></strong>

mysql&gt; <strong class="userinput"><code>CREATE TABLE dd (</code></strong>
         <strong class="userinput"><code>c1 INT NOT NULL PRIMARY KEY,</code></strong>
         <strong class="userinput"><code>c2 INT,</code></strong>
         <strong class="userinput"><code>c3 DATE</code></strong>
         <strong class="userinput"><code>)</code></strong>
         <strong class="userinput"><code>TABLESPACE ts1 STORAGE DISK</code></strong>
         <strong class="userinput"><code>ENGINE = NDB;</code></strong>

mysql&gt; <strong class="userinput"><code>INSERT INTO dd VALUES</code></strong>
         <strong class="userinput"><code>(NULL, 1234567890, '2007-02-02'),</code></strong>
         <strong class="userinput"><code>(NULL, 1126789005, '2007-02-03'),</code></strong>
         <strong class="userinput"><code>(NULL, 1357924680, '2007-02-04'),</code></strong>
         <strong class="userinput"><code>(NULL, 1642097531, '2007-02-05');</code></strong>

mysql&gt; <strong class="userinput"><code>SELECT</code></strong>
         <strong class="userinput"><code>FREE_EXTENTS AS 'Free Extents',</code></strong>
         <strong class="userinput"><code>FREE_EXTENTS * EXTENT_SIZE AS 'Free Bytes'</code></strong>
         <strong class="userinput"><code>FROM INFORMATION_SCHEMA.FILES</code></strong>
         <strong class="userinput"><code>WHERE LOGFILE_GROUP_NAME = 'lg1'</code></strong>
         <strong class="userinput"><code>AND FILE_NAME IS NULL;</code></strong>
+--------------+------------+
| Free Extents | Free Bytes |
+--------------+------------+
|      5207565 |   20830260 |
+--------------+------------+
</pre></li><li class="listitem"><p>
            An additional row is present in the
            <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> table for any NDB Cluster
            tablespace, whether or not any data files are associated
            with the tablespace. This row has <code class="literal">NULL</code>
            for the value of the <code class="literal">FILE_NAME</code> column.
            For this row, the value of the <code class="literal">FILE_ID</code>
            column is always <code class="literal">0</code>, that of the
            <code class="literal">FILE_TYPE</code> column is always
            <code class="literal">TABLESPACE</code>, and that of the
            <code class="literal">STATUS</code> column is always
            <code class="literal">NORMAL</code>. The value of the
            <code class="literal">ENGINE</code> column is always
            <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDBCLUSTER</code></a>.
          </p></li><li class="listitem"><p>
            For additional information, and examples of creating and
            dropping NDB Cluster Disk Data objects, see
            <a class="xref" href="mysql-cluster.html#mysql-cluster-disk-data" title="22.5.13 NDB Cluster Disk Data Tables">Section 22.5.13, “NDB Cluster Disk Data Tables”</a>.
</p></li></ul>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="key-column-usage-table"></a>25.12 The INFORMATION_SCHEMA KEY_COLUMN_USAGE Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569912640"></a><p>
      The <a class="link" href="information-schema.html#key-column-usage-table" title="25.12 The INFORMATION_SCHEMA KEY_COLUMN_USAGE Table"><code class="literal">KEY_COLUMN_USAGE</code></a> table describes
      which key columns have constraints. This table provides no
      information about functional key parts because they are
      expressions and the table provides information only about columns.
    </p><p>
      The <a class="link" href="information-schema.html#key-column-usage-table" title="25.12 The INFORMATION_SCHEMA KEY_COLUMN_USAGE Table"><code class="literal">KEY_COLUMN_USAGE</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">CONSTRAINT_CATALOG</code>
        </p><p>
          The name of the catalog to which the constraint belongs. This
          value is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">CONSTRAINT_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the constraint
          belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">CONSTRAINT_NAME</code>
        </p><p>
          The name of the constraint.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_CATALOG</code>
        </p><p>
          The name of the catalog to which the table belongs. This value
          is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the table belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the table that has the constraint.
        </p></li><li class="listitem"><p>
          <code class="literal">COLUMN_NAME</code>
        </p><p>
          The name of the column that has the constraint.
        </p><p>
          If the constraint is a foreign key, then this is the column of
          the foreign key, not the column that the foreign key
          references.
        </p></li><li class="listitem"><p>
          <code class="literal">ORDINAL_POSITION</code>
        </p><p>
          The column's position within the constraint, not the column's
          position within the table. Column positions are numbered
          beginning with 1.
        </p></li><li class="listitem"><p>
          <code class="literal">POSITION_IN_UNIQUE_CONSTRAINT</code>
        </p><p>
          <code class="literal">NULL</code> for unique and primary-key
          constraints. For foreign-key constraints, this column is the
          ordinal position in key of the table that is being referenced.
        </p></li><li class="listitem"><p>
          <code class="literal">REFERENCED_TABLE_SCHEMA</code>
        </p><p>
          The name of the schema referenced by the constraint.
        </p></li><li class="listitem"><p>
          <code class="literal">REFERENCED_TABLE_NAME</code>
        </p><p>
          The name of the table referenced by the constraint.
        </p></li><li class="listitem"><p>
          <code class="literal">REFERENCED_COLUMN_NAME</code>
        </p><p>
          The name of the column referenced by the constraint.
</p></li></ul>
</div>
<p>
      Suppose that there are two tables name <code class="literal">t1</code> and
      <code class="literal">t3</code> that have the following definitions:
    </p><pre data-lang="sql" class="programlisting">
CREATE TABLE t1
(
    s1 INT,
    s2 INT,
    s3 INT,
    PRIMARY KEY(s3)
) ENGINE=InnoDB;

CREATE TABLE t3
(
    s1 INT,
    s2 INT,
    s3 INT,
    KEY(s1),
    CONSTRAINT CO FOREIGN KEY (s2) REFERENCES t1(s3)
) ENGINE=InnoDB;
</pre><p>
      For those two tables, the
      <a class="link" href="information-schema.html#key-column-usage-table" title="25.12 The INFORMATION_SCHEMA KEY_COLUMN_USAGE Table"><code class="literal">KEY_COLUMN_USAGE</code></a> table has two rows:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          One row with <code class="literal">CONSTRAINT_NAME</code> =
          <code class="literal">'PRIMARY'</code>, <code class="literal">TABLE_NAME</code> =
          <code class="literal">'t1'</code>, <code class="literal">COLUMN_NAME</code> =
          <code class="literal">'s3'</code>, <code class="literal">ORDINAL_POSITION</code> =
          <code class="literal">1</code>,
          <code class="literal">POSITION_IN_UNIQUE_CONSTRAINT</code> =
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          One row with <code class="literal">CONSTRAINT_NAME</code> =
          <code class="literal">'CO'</code>, <code class="literal">TABLE_NAME</code> =
          <code class="literal">'t3'</code>, <code class="literal">COLUMN_NAME</code> =
          <code class="literal">'s2'</code>, <code class="literal">ORDINAL_POSITION</code> =
          <code class="literal">1</code>,
          <code class="literal">POSITION_IN_UNIQUE_CONSTRAINT</code> =
          <code class="literal">1</code>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="ndb-transid-mysql-connection-map-table"></a>25.13 The INFORMATION_SCHEMA ndb_transid_mysql_connection_map Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569857200"></a><p>
      The <code class="literal">ndb_transid_mysql_connection_map</code> table
      provides a mapping between <code class="literal">NDB</code> transactions,
      <code class="literal">NDB</code> transaction coordinators, and MySQL Servers
      attached to an NDB Cluster as API nodes. This information is used
      when populating the
      <a class="link" href="mysql-cluster.html#mysql-cluster-ndbinfo-server-operations" title="22.5.10.34 The ndbinfo server_operations Table"><code class="literal">server_operations</code></a> and
      <a class="link" href="mysql-cluster.html#mysql-cluster-ndbinfo-server-transactions" title="22.5.10.35 The ndbinfo server_transactions Table"><code class="literal">server_transactions</code></a> tables of
      the <a class="link" href="mysql-cluster.html#mysql-cluster-ndbinfo" title="22.5.10 ndbinfo: The NDB Cluster Information Database"><code class="literal">ndbinfo</code></a> NDB Cluster
      information database.
</p>
<div class="informaltable">
<table summary="Columns in the INFORMATION_SCHEMA ndb_transid_mysql_connection_map table. The table lists INFORMATION_SCHEMA names along with corresponding SHOW names (if applicable), and remarks."><col width="40%"><col width="30%"><col width="30%"><thead><tr>
          <th scope="col"><code class="literal">INFORMATION_SCHEMA</code> Name</th>
          <th scope="col"><code class="literal">SHOW</code> Name</th>
          <th scope="col">Remarks</th>
        </tr></thead><tbody><tr>
          <td scope="row"><code class="literal">mysql_connection_id</code></td>
          <td></td>
          <td>MySQL Server connection ID</td>
        </tr><tr>
          <td scope="row"><code class="literal">node_id</code></td>
          <td></td>
          <td>Transaction coordinator node ID</td>
        </tr><tr>
          <td scope="row"><code class="literal">ndb_transid</code></td>
          <td></td>
          <td><a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> transaction ID</td>
</tr></tbody></table>
</div>
<p>
      The <code class="literal">mysql_connection_id</code> is the same as the
      connection or session ID shown in the output of
      <a class="link" href="sql-syntax.html#show-processlist" title="13.7.6.29 SHOW PROCESSLIST Syntax"><code class="literal">SHOW PROCESSLIST</code></a>.
    </p><p>
      There are no <code class="literal">SHOW</code> statements associated with
      this table.
    </p><p>
      This is a nonstandard table, specific to NDB Cluster. It is
      implemented as an <code class="literal">INFORMATION_SCHEMA</code> plugin;
      you can verify that it is supported by checking the output of
      <a class="link" href="sql-syntax.html#show-plugins" title="13.7.6.25 SHOW PLUGINS Syntax"><code class="literal">SHOW PLUGINS</code></a>. If
      <code class="literal">ndb_transid_mysql_connection_map</code> support is
      enabled, the output from this statement includes a plugin having
      this name, of type <code class="literal">INFORMATION SCHEMA</code>, and
      having status <code class="literal">ACTIVE</code>, as shown here (using
      emphasized text):
    </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SHOW PLUGINS;</code></strong>
+----------------------------------+--------+--------------------+---------+---------+
| Name                             | Status | Type               | Library | License |
+----------------------------------+--------+--------------------+---------+---------+
| binlog                           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| mysql_native_password            | ACTIVE | AUTHENTICATION     | NULL    | GPL     |
| CSV                              | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| MEMORY                           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| MRG_MYISAM                       | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| MyISAM                           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| PERFORMANCE_SCHEMA               | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| BLACKHOLE                        | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| ARCHIVE                          | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| ndbcluster                       | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| ndbinfo                          | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
<span class="emphasis"><em>| ndb_transid_mysql_connection_map | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |</em></span>
| InnoDB                           | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
| INNODB_TRX                       | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_LOCKS                     | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_LOCK_WAITS                | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMP                       | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMP_RESET                 | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMPMEM                    | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| INNODB_CMPMEM_RESET              | ACTIVE | INFORMATION SCHEMA | NULL    | GPL     |
| partition                        | ACTIVE | STORAGE ENGINE     | NULL    | GPL     |
+----------------------------------+--------+--------------------+---------+---------+
22 rows in set (0.00 sec)
</pre><p>
      The plugin is enabled by default. You can disable it (or force the
      server not to run unless the plugin starts) by starting the server
      with the
      <a class="link" href="mysql-cluster.html#option_mysqld_ndb-transid-mysql-connection-map"><code class="option">--ndb-transid-mysql-connection-map</code></a>
      option. If the plugin is disabled, the status is shown by
      <a class="link" href="sql-syntax.html#show-plugins" title="13.7.6.25 SHOW PLUGINS Syntax"><code class="literal">SHOW PLUGINS</code></a> as
      <code class="literal">DISABLED</code>. The plugin cannot be enabled or
      disabled at runtime.
    </p><p>
      Although the names of this table and its columns are displayed
      using lowercase, you can use uppercase or lowercase when referring
      to them in SQL statements.
    </p><p>
      For this table to be created, the MySQL Server must be a binary
      supplied with the NDB Cluster distribution, or one built from the
      NDB Cluster sources with <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> storage
      engine support enabled. It is not available in the standard MySQL
      8.0 Server.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="keywords-table"></a>25.14 The INFORMATION_SCHEMA KEYWORDS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569808672"></a><p>
      The <a class="link" href="information-schema.html#keywords-table" title="25.14 The INFORMATION_SCHEMA KEYWORDS Table"><code class="literal">KEYWORDS</code></a> table lists the words
      considered keywords by MySQL and, for each one, indicates whether
      it is reserved. Reserved keywords may require special treatment in
      some contexts, such as special quoting when used as identifiers
      (see <a class="xref" href="language-structure.html#keywords" title="9.3 Keywords and Reserved Words">Section 9.3, “Keywords and Reserved Words”</a>). This table provides applications
      a runtime source of MySQL keyword information.
    </p><p>
      Prior to MySQL 8.0.13, selecting from the
      <code class="literal">KEYWORDS</code> table with no default database
      selected produced an error. (Bug #90160, Bug #27729859)
    </p><p>
      The <a class="link" href="information-schema.html#keywords-table" title="25.14 The INFORMATION_SCHEMA KEYWORDS Table"><code class="literal">KEYWORDS</code></a> table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">WORD</code>
        </p><p>
          The keyword.
        </p></li><li class="listitem"><p>
          <code class="literal">RESERVED</code>
        </p><p>
          An integer indicating whether the keyword is reserved (1) or
          nonreserved (0).
</p></li></ul>
</div>
<p>
      These queries lists all keywords, all reserved keywords, and all
      nonreserved keywords, respectively:
    </p><pre data-lang="sql" class="programlisting">
SELECT * FROM INFORMATION_SCHEMA.KEYWORDS;
SELECT WORD FROM INFORMATION_SCHEMA.KEYWORDS WHERE RESERVED = 1;
SELECT WORD FROM INFORMATION_SCHEMA.KEYWORDS WHERE RESERVED = 0;
</pre><p>
      The latter two queries are equivalent to:
    </p><pre data-lang="sql" class="programlisting">
SELECT WORD FROM INFORMATION_SCHEMA.KEYWORDS WHERE RESERVED;
SELECT WORD FROM INFORMATION_SCHEMA.KEYWORDS WHERE NOT RESERVED;
</pre><a class="indexterm" name="idm140091569794320"></a><a class="indexterm" name="idm140091569793232"></a><p>
      If you build MySQL from source, the build process generates a
      <code class="filename">keyword_list.h</code> header file containing an
      array of keywords and their reserved status. This file can be
      found in the <code class="filename">sql</code> directory under the build
      directory. This file may be useful for applications that require a
      static source for the keyword list.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="optimizer-trace-table"></a>25.15 The INFORMATION_SCHEMA OPTIMIZER_TRACE Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569788400"></a><p>
      The <a class="link" href="information-schema.html#optimizer-trace-table" title="25.15 The INFORMATION_SCHEMA OPTIMIZER_TRACE Table"><code class="literal">OPTIMIZER_TRACE</code></a> table provides
      information produced by the optimizer tracing capability for
      traced statements. To enable tracking, use the
      <a class="link" href="server-administration.html#sysvar_optimizer_trace"><code class="literal">optimizer_trace</code></a> system variable.
      For details, see
      <a class="ulink" href="https://dev.mysql.com/doc/internals/en/optimizer-tracing.html" target="_top">MySQL
      Internals: Tracing the Optimizer</a>.
    </p><p>
      The <a class="link" href="information-schema.html#optimizer-trace-table" title="25.15 The INFORMATION_SCHEMA OPTIMIZER_TRACE Table"><code class="literal">OPTIMIZER_TRACE</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">QUERY</code>
        </p><p>
          The text of the traced statement.
        </p></li><li class="listitem"><p>
          <code class="literal">TRACE</code>
        </p><p>
          The trace, in <code class="literal">JSON</code> format.
        </p></li><li class="listitem"><p>
          <code class="literal">MISSING_BYTES_BEYOND_MAX_MEM_SIZE</code>
        </p><p>
          Each remembered trace is a string that is extended as
          optimization progresses and appends data to it. The
          <a class="link" href="server-administration.html#sysvar_optimizer_trace_max_mem_size"><code class="literal">optimizer_trace_max_mem_size</code></a>
          variable sets a limit on the total amount of memory used by
          all currently remembered traces. If this limit is reached, the
          current trace is not extended (and thus is incomplete), and
          the <code class="literal">MISSING_BYTES_BEYOND_MAX_MEM_SIZE</code>
          column shows the number of bytes missing from the trace.
        </p></li><li class="listitem"><p>
          <code class="literal">INSUFFICIENT_PRIVILEGES</code>
        </p><p>
          If a traced query uses views or stored routines that have
          <code class="literal">SQL SECURITY</code> with a value of
          <code class="literal">DEFINER</code>, it may be that a user other than
          the definer is denied from seeing the trace of the query. In
          that case, the trace is shown as empty and
          <code class="literal">INSUFFICIENT_PRIVILEGES</code> has a value of 1.
          Otherwise, the value is 0.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="parameters-table"></a>25.16 The INFORMATION_SCHEMA PARAMETERS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569766624"></a><p>
      The <a class="link" href="information-schema.html#parameters-table" title="25.16 The INFORMATION_SCHEMA PARAMETERS Table"><code class="literal">PARAMETERS</code></a> table provides
      information about parameters for stored routines (stored
      procedures and stored functions), and about return values for
      stored functions. The <a class="link" href="information-schema.html#parameters-table" title="25.16 The INFORMATION_SCHEMA PARAMETERS Table"><code class="literal">PARAMETERS</code></a>
      table does not include built-in SQL functions or user-defined
      functions (UDFs).
    </p><p>
      The <a class="link" href="information-schema.html#parameters-table" title="25.16 The INFORMATION_SCHEMA PARAMETERS Table"><code class="literal">PARAMETERS</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">SPECIFIC_CATALOG</code>
        </p><p>
          The name of the catalog to which the routine containing the
          parameter belongs. This value is always
          <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">SPECIFIC_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the routine
          containing the parameter belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">SPECIFIC_NAME</code>
        </p><p>
          The name of the routine containing the parameter.
        </p></li><li class="listitem"><p>
          <code class="literal">ORDINAL_POSITION</code>
        </p><p>
          For successive parameters of a stored procedure or function,
          the <code class="literal">ORDINAL_POSITION</code> values are 1, 2, 3,
          and so forth. For a stored function, there is also a row that
          applies to the function return value (as described by the
          <code class="literal">RETURNS</code> clause). The return value is not a
          true parameter, so the row that describes it has these unique
          characteristics:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              The <code class="literal">ORDINAL_POSITION</code> value is 0.
            </p></li><li class="listitem"><p>
              The <code class="literal">PARAMETER_NAME</code> and
              <code class="literal">PARAMETER_MODE</code> values are
              <code class="literal">NULL</code> because the return value has no
              name and the mode does not apply.
</p></li></ul>
</div>
</li><li class="listitem"><p>
          <code class="literal">PARAMETER_MODE</code>
        </p><p>
          The mode of the parameter. This value is one of
          <code class="literal">IN</code>, <code class="literal">OUT</code>, or
          <code class="literal">INOUT</code>. For a stored function return value,
          this value is <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">PARAMETER_NAME</code>
        </p><p>
          The name of the parameter. For a stored function return value,
          this value is <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">DATA_TYPE</code>
        </p><p>
          The parameter data type.
        </p><p>
          The <code class="literal">DATA_TYPE</code> value is the type name only
          with no other information. The
          <code class="literal">DTD_IDENTIFIER</code> value contains the type name
          and possibly other information such as the precision or
          length.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_MAXIMUM_LENGTH</code>
        </p><p>
          For string parameters, the maximum length in characters.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_OCTET_LENGTH</code>
        </p><p>
          For string parameters, the maximum length in bytes.
        </p></li><li class="listitem"><p>
          <code class="literal">NUMERIC_PRECISION</code>
        </p><p>
          For numeric parameters, the numeric precision.
        </p></li><li class="listitem"><p>
          <code class="literal">NUMERIC_SCALE</code>
        </p><p>
          For numeric parameters, the numeric scale.
        </p></li><li class="listitem"><p>
          <code class="literal">DATETIME_PRECISION</code>
        </p><p>
          For temporal parameters, the fractional seconds precision.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_SET_NAME</code>
        </p><p>
          For character string parameters, the character set name.
        </p></li><li class="listitem"><p>
          <code class="literal">COLLATION_NAME</code>
        </p><p>
          For character string parameters, the collation name.
        </p></li><li class="listitem"><p>
          <code class="literal">DTD_IDENTIFIER</code>
        </p><p>
          The parameter data type.
        </p><p>
          The <code class="literal">DATA_TYPE</code> value is the type name only
          with no other information. The
          <code class="literal">DTD_IDENTIFIER</code> value contains the type name
          and possibly other information such as the precision or
          length.
        </p></li><li class="listitem"><p>
          <code class="literal">ROUTINE_TYPE</code>
        </p><p>
          <code class="literal">PROCEDURE</code> for stored procedures,
          <code class="literal">FUNCTION</code> for stored functions.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="partitions-table"></a>25.17 The INFORMATION_SCHEMA PARTITIONS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569711440"></a><p>
      The <a class="link" href="information-schema.html#partitions-table" title="25.17 The INFORMATION_SCHEMA PARTITIONS Table"><code class="literal">PARTITIONS</code></a> table provides
      information about table partitions. Each row in this table
      corresponds to an individual partition or subpartition of a
      partitioned table. For more information about partitioning tables,
      see <a class="xref" href="partitioning.html" title="Chapter 23 Partitioning">Chapter 23, <i>Partitioning</i></a>.
    </p><p>
      The <a class="link" href="information-schema.html#partitions-table" title="25.17 The INFORMATION_SCHEMA PARTITIONS Table"><code class="literal">PARTITIONS</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TABLE_CATALOG</code>
        </p><p>
          The name of the catalog to which the table belongs. This value
          is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the table belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the table containing the partition.
        </p></li><li class="listitem"><p>
          <code class="literal">PARTITION_NAME</code>
        </p><p>
          The name of the partition.
        </p></li><li class="listitem"><p>
          <code class="literal">SUBPARTITION_NAME</code>
        </p><p>
          If the <a class="link" href="information-schema.html#partitions-table" title="25.17 The INFORMATION_SCHEMA PARTITIONS Table"><code class="literal">PARTITIONS</code></a> table row
          represents a subpartition, the name of subpartition; otherwise
          <code class="literal">NULL</code>.
        </p><p>
          For <code class="literal">NDB</code>: This value is always
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">PARTITION_ORDINAL_POSITION</code>
        </p><p>
          All partitions are indexed in the same order as they are
          defined, with <code class="literal">1</code> being the number assigned
          to the first partition. The indexing can change as partitions
          are added, dropped, and reorganized; the number shown is this
          column reflects the current order, taking into account any
          indexing changes.
        </p></li><li class="listitem"><p>
          <code class="literal">SUBPARTITION_ORDINAL_POSITION</code>
        </p><p>
          Subpartitions within a given partition are also indexed and
          reindexed in the same manner as partitions are indexed within
          a table.
        </p></li><li class="listitem"><p>
          <code class="literal">PARTITION_METHOD</code>
        </p><p>
          One of the values <code class="literal">RANGE</code>,
          <code class="literal">LIST</code>, <code class="literal">HASH</code>,
          <code class="literal">LINEAR HASH</code>, <code class="literal">KEY</code>, or
          <code class="literal">LINEAR KEY</code>; that is, one of the available
          partitioning types as discussed in
          <a class="xref" href="partitioning.html#partitioning-types" title="23.2 Partitioning Types">Section 23.2, “Partitioning Types”</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">SUBPARTITION_METHOD</code>
        </p><p>
          One of the values <code class="literal">HASH</code>, <code class="literal">LINEAR
          HASH</code>, <code class="literal">KEY</code>, or <code class="literal">LINEAR
          KEY</code>; that is, one of the available subpartitioning
          types as discussed in
          <a class="xref" href="partitioning.html#partitioning-subpartitions" title="23.2.6 Subpartitioning">Section 23.2.6, “Subpartitioning”</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">PARTITION_EXPRESSION</code>
        </p><p>
          The expression for the partitioning function used in the
          <a class="link" href="sql-syntax.html#create-table" title="13.1.20 CREATE TABLE Syntax"><code class="literal">CREATE TABLE</code></a> or
          <a class="link" href="sql-syntax.html#alter-table" title="13.1.9 ALTER TABLE Syntax"><code class="literal">ALTER TABLE</code></a> statement that
          created the table's current partitioning scheme.
        </p><p>
          For example, consider a partitioned table created in the
          <code class="literal">test</code> database using this statement:
        </p><pre data-lang="sql" class="programlisting">
CREATE TABLE tp (
    c1 INT,
    c2 INT,
    c3 VARCHAR(25)
)
PARTITION BY HASH(c1 + c2)
PARTITIONS 4;
</pre><p>
          The <code class="literal">PARTITION_EXPRESSION</code> column in a
          <a class="link" href="information-schema.html#partitions-table" title="25.17 The INFORMATION_SCHEMA PARTITIONS Table"><code class="literal">PARTITIONS</code></a> table row for a
          partition from this table displays <code class="literal">c1 + c2</code>,
          as shown here:
        </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT DISTINCT PARTITION_EXPRESSION</code></strong>
       <strong class="userinput"><code>FROM INFORMATION_SCHEMA.PARTITIONS</code></strong>
       <strong class="userinput"><code>WHERE TABLE_NAME='tp' AND TABLE_SCHEMA='test';</code></strong>
+----------------------+
| PARTITION_EXPRESSION |
+----------------------+
| c1 + c2              |
+----------------------+
</pre></li><li class="listitem"><p>
          <code class="literal">SUBPARTITION_EXPRESSION</code>
        </p><p>
          This works in the same fashion for the subpartitioning
          expression that defines the subpartitioning for a table as
          <code class="literal">PARTITION_EXPRESSION</code> does for the
          partitioning expression used to define a table's partitioning.
        </p><p>
          If the table has no subpartitions, this column is
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">PARTITION_DESCRIPTION</code>
        </p><p>
          This column is used for RANGE and LIST partitions. For a
          <code class="literal">RANGE</code> partition, it contains the value set
          in the partition's <code class="literal">VALUES LESS THAN</code> clause,
          which can be either an integer or <code class="literal">MAXVALUE</code>.
          For a <code class="literal">LIST</code> partition, this column contains
          the values defined in the partition's <code class="literal">VALUES
          IN</code> clause, which is a list of comma-separated
          integer values.
        </p><p>
          For partitions whose <code class="literal">PARTITION_METHOD</code> is
          other than <code class="literal">RANGE</code> or
          <code class="literal">LIST</code>, this column is always
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_ROWS</code>
        </p><p>
          The number of table rows in the partition.
        </p><p>
          For partitioned <a class="link" href="innodb-storage-engine.html" title="Chapter 15 The InnoDB Storage Engine"><code class="literal">InnoDB</code></a> tables,
          the row count given in the <code class="literal">TABLE_ROWS</code>
          column is only an estimated value used in SQL optimization,
          and may not always be exact.
        </p><p>
          For <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> tables, you can also
          obtain this information using the <a class="link" href="mysql-cluster.html#mysql-cluster-programs-ndb-desc" title="22.4.9 ndb_desc — Describe NDB Tables"><span class="command"><strong>ndb_desc</strong></span></a>
          utility.
        </p></li><li class="listitem"><p>
          <code class="literal">AVG_ROW_LENGTH</code>
        </p><p>
          The average length of the rows stored in this partition or
          subpartition, in bytes. This is the same as
          <code class="literal">DATA_LENGTH</code> divided by
          <code class="literal">TABLE_ROWS</code>.
        </p><p>
          For <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> tables, you can also
          obtain this information using the <a class="link" href="mysql-cluster.html#mysql-cluster-programs-ndb-desc" title="22.4.9 ndb_desc — Describe NDB Tables"><span class="command"><strong>ndb_desc</strong></span></a>
          utility.
        </p></li><li class="listitem"><p>
          <code class="literal">DATA_LENGTH</code>
        </p><p>
          The total length of all rows stored in this partition or
          subpartition, in bytes; that is, the total number of bytes
          stored in the partition or subpartition.
        </p><p>
          For <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> tables, you can also
          obtain this information using the <a class="link" href="mysql-cluster.html#mysql-cluster-programs-ndb-desc" title="22.4.9 ndb_desc — Describe NDB Tables"><span class="command"><strong>ndb_desc</strong></span></a>
          utility.
        </p></li><li class="listitem"><p>
          <code class="literal">MAX_DATA_LENGTH</code>
        </p><p>
          The maximum number of bytes that can be stored in this
          partition or subpartition.
        </p><p>
          For <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> tables, you can also
          obtain this information using the <a class="link" href="mysql-cluster.html#mysql-cluster-programs-ndb-desc" title="22.4.9 ndb_desc — Describe NDB Tables"><span class="command"><strong>ndb_desc</strong></span></a>
          utility.
        </p></li><li class="listitem"><p>
          <code class="literal">INDEX_LENGTH</code>
        </p><p>
          The length of the index file for this partition or
          subpartition, in bytes.
        </p><p>
          For partitions of <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> tables,
          whether the tables use implicit or explicit partitioning, the
          <code class="literal">INDEX_LENGTH</code> column value is always 0.
          However, you can obtain equivalent information using the
          <a class="link" href="mysql-cluster.html#mysql-cluster-programs-ndb-desc" title="22.4.9 ndb_desc — Describe NDB Tables"><span class="command"><strong>ndb_desc</strong></span></a> utility.
        </p></li><li class="listitem"><p>
          <code class="literal">DATA_FREE</code>
        </p><p>
          The number of bytes allocated to the partition or subpartition
          but not used.
        </p><p>
          For <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> tables, you can also
          obtain this information using the <a class="link" href="mysql-cluster.html#mysql-cluster-programs-ndb-desc" title="22.4.9 ndb_desc — Describe NDB Tables"><span class="command"><strong>ndb_desc</strong></span></a>
          utility.
        </p></li><li class="listitem"><p>
          <code class="literal">CREATE_TIME</code>
        </p><p>
          The time that the partition or subpartition was created.
        </p></li><li class="listitem"><p>
          <code class="literal">UPDATE_TIME</code>
        </p><p>
          The time that the partition or subpartition was last modified.
        </p></li><li class="listitem"><p>
          <code class="literal">CHECK_TIME</code>
        </p><p>
          The last time that the table to which this partition or
          subpartition belongs was checked.
        </p><p>
          For partitioned <a class="link" href="innodb-storage-engine.html" title="Chapter 15 The InnoDB Storage Engine"><code class="literal">InnoDB</code></a> tables,
          the value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">CHECKSUM</code>
        </p><p>
          The checksum value, if any; otherwise <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">PARTITION_COMMENT</code>
        </p><p>
          The text of the comment, if the partition has one. If not,
          this value is empty.
        </p><p>
          The maximum length for a partition comment is defined as 1024
          characters, and the display width of the
          <code class="literal">PARTITION_COMMENT</code> column is also 1024,
          characters to match this limit.
        </p></li><li class="listitem"><p>
          <code class="literal">NODEGROUP</code>
        </p><p>
          This is the nodegroup to which the partition belongs. This is
          relevant only to NDB Cluster tables; otherwise, the value is
          always <code class="literal">0</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLESPACE_NAME</code>
        </p><p>
          The name of the tablespace to which the partition belongs. The
          value is always <code class="literal">DEFAULT</code>, unless the table
          uses the <code class="literal">NDB</code> storage engine (see the
          <em class="citetitle">Notes</em> at the end of this section).
</p></li></ul>
</div>
<h3><a name="idm140091569592816"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The <a class="link" href="information-schema.html#partitions-table" title="25.17 The INFORMATION_SCHEMA PARTITIONS Table"><code class="literal">PARTITIONS</code></a> table is a
          nonstandard <code class="literal">INFORMATION_SCHEMA</code> table.
        </p></li><li class="listitem"><p>
          A table using any storage engine other than
          <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> and which is not partitioned
          has one row in the <a class="link" href="information-schema.html#partitions-table" title="25.17 The INFORMATION_SCHEMA PARTITIONS Table"><code class="literal">PARTITIONS</code></a>
          table. However, the values of the
          <code class="literal">PARTITION_NAME</code>,
          <code class="literal">SUBPARTITION_NAME</code>,
          <code class="literal">PARTITION_ORDINAL_POSITION</code>,
          <code class="literal">SUBPARTITION_ORDINAL_POSITION</code>,
          <code class="literal">PARTITION_METHOD</code>,
          <code class="literal">SUBPARTITION_METHOD</code>,
          <code class="literal">PARTITION_EXPRESSION</code>,
          <code class="literal">SUBPARTITION_EXPRESSION</code>, and
          <code class="literal">PARTITION_DESCRIPTION</code> columns are all
          <code class="literal">NULL</code>. Also, the
          <code class="literal">PARTITION_COMMENT</code> column in this case is
          blank.
        </p></li><li class="listitem"><p>
          An <code class="literal">NDB</code> table which is not explicitly
          partitioned has one row in the <code class="literal">PARTITIONS</code>
          table for each data node in the NDB cluster. For each such
          row:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              The <code class="literal">SUBPARTITION_NAME</code>,
              <code class="literal">SUBPARTITION_ORDINAL_POSITION</code>,
              <code class="literal">SUBPARTITION_METHOD</code>,
              <code class="literal">PARTITION_EXPRESSION</code>,
              <code class="literal">SUBPARTITION_EXPRESSION</code>,
              <code class="literal">CREATE_TIME</code>,
              <code class="literal">UPDATE_TIME</code>,
              <code class="literal">CHECK_TIME</code>,
              <code class="literal">CHECKSUM</code>, and
              <code class="literal">TABLESPACE_NAME</code> columns are all
              <code class="literal">NULL</code>.
            </p></li><li class="listitem"><p>
              The <code class="literal">PARTITION_METHOD</code> is always
              <code class="literal">AUTO</code>.
            </p></li><li class="listitem"><p>
              The <code class="literal">NODEGROUP</code> column is
              <code class="literal">default</code>.
            </p></li><li class="listitem"><p>
              The <code class="literal">PARTITION_EXPRESSION</code> and
              <code class="literal">PARTITION_COMMENT</code> columns are empty.
</p></li></ul>
</div>
</li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="plugins-table"></a>25.18 The INFORMATION_SCHEMA PLUGINS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569558080"></a><p>
      The <a class="link" href="information-schema.html#plugins-table" title="25.18 The INFORMATION_SCHEMA PLUGINS Table"><code class="literal">PLUGINS</code></a> table provides
      information about server plugins.
    </p><p>
      The <a class="link" href="information-schema.html#plugins-table" title="25.18 The INFORMATION_SCHEMA PLUGINS Table"><code class="literal">PLUGINS</code></a> table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">PLUGIN_NAME</code>
        </p><p>
          The name used to refer to the plugin in statements such as
          <a class="link" href="sql-syntax.html#install-plugin" title="13.7.4.4 INSTALL PLUGIN Syntax"><code class="literal">INSTALL PLUGIN</code></a> and
          <a class="link" href="sql-syntax.html#uninstall-plugin" title="13.7.4.6 UNINSTALL PLUGIN Syntax"><code class="literal">UNINSTALL PLUGIN</code></a>.
        </p></li><li class="listitem"><p>
          <code class="literal">PLUGIN_VERSION</code>
        </p><p>
          The version from the plugin's general type descriptor.
        </p></li><li class="listitem"><p>
          <code class="literal">PLUGIN_STATUS</code>
        </p><p>
          The plugin status, one of <code class="literal">ACTIVE</code>,
          <code class="literal">INACTIVE</code>, <code class="literal">DISABLED</code>,
          <code class="literal">DELETING</code>, or <code class="literal">DELETED</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">PLUGIN_TYPE</code>
        </p><p>
          The type of plugin, such as <code class="literal">STORAGE ENGINE</code>,
          <code class="literal">INFORMATION_SCHEMA</code>, or
          <code class="literal">AUTHENTICATION</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">PLUGIN_TYPE_VERSION</code>
        </p><p>
          The version from the plugin's type-specific descriptor.
        </p></li><li class="listitem"><p>
          <code class="literal">PLUGIN_LIBRARY</code>
        </p><p>
          The name of the plugin shared library file. This is the name
          used to refer to the plugin file in statements such as
          <a class="link" href="sql-syntax.html#install-plugin" title="13.7.4.4 INSTALL PLUGIN Syntax"><code class="literal">INSTALL PLUGIN</code></a> and
          <a class="link" href="sql-syntax.html#uninstall-plugin" title="13.7.4.6 UNINSTALL PLUGIN Syntax"><code class="literal">UNINSTALL PLUGIN</code></a>. This file is
          located in the directory named by the
          <a class="link" href="server-administration.html#sysvar_plugin_dir"><code class="literal">plugin_dir</code></a> system variable.
          If the library name is <code class="literal">NULL</code>, the plugin is
          compiled in and cannot be uninstalled with
          <a class="link" href="sql-syntax.html#uninstall-plugin" title="13.7.4.6 UNINSTALL PLUGIN Syntax"><code class="literal">UNINSTALL PLUGIN</code></a>.
        </p></li><li class="listitem"><p>
          <code class="literal">PLUGIN_LIBRARY_VERSION</code>
        </p><p>
          The plugin API interface version.
        </p></li><li class="listitem"><p>
          <code class="literal">PLUGIN_AUTHOR</code>
        </p><p>
          The plugin author.
        </p></li><li class="listitem"><p>
          <code class="literal">PLUGIN_DESCRIPTION</code>
        </p><p>
          A short description of the plugin.
        </p></li><li class="listitem"><p>
          <code class="literal">PLUGIN_LICENSE</code>
        </p><p>
          How the plugin is licensed (for example,
          <code class="literal">GPL</code>).
        </p></li><li class="listitem"><p>
          <code class="literal">LOAD_OPTION</code>
        </p><p>
          How the plugin was loaded. The value is
          <code class="literal">OFF</code>, <code class="literal">ON</code>,
          <code class="literal">FORCE</code>, or
          <code class="literal">FORCE_PLUS_PERMANENT</code>. See
          <a class="xref" href="server-administration.html#plugin-loading" title="5.6.1 Installing and Uninstalling Plugins">Section 5.6.1, “Installing and Uninstalling Plugins”</a>.
</p></li></ul>
</div>
<h3><a name="idm140091569513600"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The <a class="link" href="information-schema.html#plugins-table" title="25.18 The INFORMATION_SCHEMA PLUGINS Table"><code class="literal">PLUGINS</code></a> table is a
          nonstandard <code class="literal">INFORMATION_SCHEMA</code> table.
        </p></li><li class="listitem"><p>
          For plugins installed with <a class="link" href="sql-syntax.html#install-plugin" title="13.7.4.4 INSTALL PLUGIN Syntax"><code class="literal">INSTALL
          PLUGIN</code></a>, the <code class="literal">PLUGIN_NAME</code> and
          <code class="literal">PLUGIN_LIBRARY</code> values are also registered
          in the <code class="literal">mysql.plugin</code> table.
        </p></li><li class="listitem"><p>
          For information about plugin data structures that form the
          basis of the information in the
          <a class="link" href="information-schema.html#plugins-table" title="25.18 The INFORMATION_SCHEMA PLUGINS Table"><code class="literal">PLUGINS</code></a> table, see
          <a class="xref" href="extending-mysql.html#plugin-api" title="29.2 The MySQL Plugin API">Section 29.2, “The MySQL Plugin API”</a>.
</p></li></ul>
</div>
<p>
      Plugin information is also available from the
      <a class="link" href="sql-syntax.html#show-plugins" title="13.7.6.25 SHOW PLUGINS Syntax"><code class="literal">SHOW PLUGINS</code></a> statement. See
      <a class="xref" href="sql-syntax.html#show-plugins" title="13.7.6.25 SHOW PLUGINS Syntax">Section 13.7.6.25, “SHOW PLUGINS Syntax”</a>. These statements are equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT
  PLUGIN_NAME, PLUGIN_STATUS, PLUGIN_TYPE,
  PLUGIN_LIBRARY, PLUGIN_LICENSE
FROM INFORMATION_SCHEMA.PLUGINS;

SHOW PLUGINS;
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="processlist-table"></a>25.19 The INFORMATION_SCHEMA PROCESSLIST Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569498032"></a><a class="indexterm" name="idm140091569496560"></a><p>
      The <a class="link" href="information-schema.html#processlist-table" title="25.19 The INFORMATION_SCHEMA PROCESSLIST Table"><code class="literal">PROCESSLIST</code></a> table provides
      information about which threads are running.
    </p><p>
      The <a class="link" href="information-schema.html#processlist-table" title="25.19 The INFORMATION_SCHEMA PROCESSLIST Table"><code class="literal">PROCESSLIST</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">ID</code>
        </p><p>
          The connection identifier. This is the same type of value
          displayed in the <code class="literal">Id</code> column of the
          <a class="link" href="sql-syntax.html#show-processlist" title="13.7.6.29 SHOW PROCESSLIST Syntax"><code class="literal">SHOW PROCESSLIST</code></a> statement, the
          <code class="literal">PROCESSLIST_ID</code> column of the Performance
          Schema <a class="link" href="performance-schema.html#threads-table" title="26.12.17.5 The threads Table"><code class="literal">threads</code></a> table, and
          returned by the <a class="link" href="functions.html#function_connection-id"><code class="literal">CONNECTION_ID()</code></a>
          function.
        </p></li><li class="listitem"><p>
          <code class="literal">USER</code>
        </p><p>
          The MySQL user who issued the statement. A value of
          <code class="literal">system user</code> refers to a nonclient thread
          spawned by the server to handle tasks internally. This could
          be the I/O or SQL thread used on replication slaves or a
          delayed-row handler. For <code class="literal">system user</code>, there
          is no host specified in the <code class="literal">Host</code> column.
          <code class="literal">unauthenticated user</code> refers to a thread
          that has become associated with a client connection but for
          which authentication of the client user has not yet been done.
          <code class="literal">event_scheduler</code> refers to the thread that
          monitors scheduled events (see
          <a class="xref" href="stored-objects.html#event-scheduler" title="24.4 Using the Event Scheduler">Section 24.4, “Using the Event Scheduler”</a>).
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
            A <code class="literal">USER</code> value of <code class="literal">system
            user</code> is distinct from the
            <a class="link" href="security.html#priv_system-user"><code class="literal">SYSTEM_USER</code></a> privilege. The
            former designates internal threads. The latter distinguishes
            the system user and regular user account categories (see
            <a class="xref" href="security.html#account-categories" title="6.2.11 Account Categories">Section 6.2.11, “Account Categories”</a>).
</p>
</div>
</li><li class="listitem"><p>
          <code class="literal">HOST</code>
        </p><p>
          The host name of the client issuing the statement (except for
          <code class="literal">system user</code>, for which there is no host).
          The host name for TCP/IP connections is reported in
          <code class="literal"><em class="replaceable"><code>host_name</code></em>:<em class="replaceable"><code>client_port</code></em></code>
          format to make it easier to determine which client is doing
          what.
        </p></li><li class="listitem"><p>
          <code class="literal">DB</code>
        </p><p>
          The default database, if one is selected; otherwise
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">COMMAND</code>
        </p><p>
          The type of command the thread is executing. For descriptions
          for thread commands, see <a class="xref" href="optimization.html#thread-information" title="8.14 Examining Thread Information">Section 8.14, “Examining Thread Information”</a>.
          The value of this column corresponds to the
          <code class="literal">COM_<em class="replaceable"><code>xxx</code></em></code> commands
          of the client/server protocol and
          <code class="literal">Com_<em class="replaceable"><code>xxx</code></em></code> status
          variables. See <a class="xref" href="server-administration.html#server-status-variables" title="5.1.10 Server Status Variables">Section 5.1.10, “Server Status Variables”</a>
        </p></li><li class="listitem"><p>
          <code class="literal">TIME</code>
        </p><p>
          The time in seconds that the thread has been in its current
          state. For a slave SQL thread, the value is the number of
          seconds between the timestamp of the last replicated event and
          the real time of the slave machine. See
          <a class="xref" href="replication.html#replication-implementation-details" title="17.2.2 Replication Implementation Details">Section 17.2.2, “Replication Implementation Details”</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">STATE</code>
        </p><p>
          An action, event, or state that indicates what the thread is
          doing. Descriptions for <code class="literal">STATE</code> values can be
          found at <a class="xref" href="optimization.html#thread-information" title="8.14 Examining Thread Information">Section 8.14, “Examining Thread Information”</a>.
        </p><p>
          Most states correspond to very quick operations. If a thread
          stays in a given state for many seconds, there might be a
          problem that needs to be investigated.
        </p><p>
          For the <a class="link" href="sql-syntax.html#show-processlist" title="13.7.6.29 SHOW PROCESSLIST Syntax"><code class="literal">SHOW PROCESSLIST</code></a>
          statement, the value of <code class="literal">STATE</code> is
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">INFO</code>
        </p><p>
          The statement the thread is executing, or
          <code class="literal">NULL</code> if it is not executing any statement.
          The statement might be the one sent to the server, or an
          innermost statement if the statement executes other
          statements. For example, if a <code class="literal">CALL</code>
          statement executes a stored procedure that is executing a
          <a class="link" href="sql-syntax.html#select" title="13.2.10 SELECT Syntax"><code class="literal">SELECT</code></a> statement, the
          <code class="literal">INFO</code> value shows the
          <a class="link" href="sql-syntax.html#select" title="13.2.10 SELECT Syntax"><code class="literal">SELECT</code></a> statement.
</p></li></ul>
</div>
<h3><a name="idm140091569444448"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The <a class="link" href="information-schema.html#processlist-table" title="25.19 The INFORMATION_SCHEMA PROCESSLIST Table"><code class="literal">PROCESSLIST</code></a> table is a
          nonstandard <code class="literal">INFORMATION_SCHEMA</code> table.
        </p></li><li class="listitem"><p>
          Like the output from the <a class="link" href="sql-syntax.html#show-processlist" title="13.7.6.29 SHOW PROCESSLIST Syntax"><code class="literal">SHOW
          PROCESSLIST</code></a> statement, the
          <a class="link" href="information-schema.html#processlist-table" title="25.19 The INFORMATION_SCHEMA PROCESSLIST Table"><code class="literal">PROCESSLIST</code></a> table shows
          information only about your own threads, unless you have the
          <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a> privilege, in which
          case you will see information about other threads, too. As an
          anonymous user, you cannot see any rows at all.
        </p></li><li class="listitem"><p>
          If an SQL statement refers to the
          <a class="link" href="information-schema.html#processlist-table" title="25.19 The INFORMATION_SCHEMA PROCESSLIST Table"><code class="literal">PROCESSLIST</code></a> table, MySQL
          populates the entire table once, when statement execution
          begins, so there is read consistency during the statement.
          There is no read consistency for a multi-statement
          transaction.
</p></li></ul>
</div>
<p>
      Process information is also available from the <a class="link" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server"><span class="command"><strong>mysqladmin
      processlist</strong></span></a> command, the <a class="link" href="sql-syntax.html#show-processlist" title="13.7.6.29 SHOW PROCESSLIST Syntax"><code class="literal">SHOW
      PROCESSLIST</code></a> statement, and the Performance Schema
      <a class="link" href="performance-schema.html#threads-table" title="26.12.17.5 The threads Table"><code class="literal">threads</code></a> table (see
      <a class="xref" href="programs.html#mysqladmin" title="4.5.2 mysqladmin — Client for Administering a MySQL Server">Section 4.5.2, “<span class="command"><strong>mysqladmin</strong></span> — Client for Administering a MySQL Server”</a>, <a class="xref" href="sql-syntax.html#show-processlist" title="13.7.6.29 SHOW PROCESSLIST Syntax">Section 13.7.6.29, “SHOW PROCESSLIST Syntax”</a>,
      and <a class="xref" href="performance-schema.html#threads-table" title="26.12.17.5 The threads Table">Section 26.12.17.5, “The threads Table”</a>). In contrast to the
      <code class="literal">INFORMATION_SCHEMA</code>
      <a class="link" href="information-schema.html#processlist-table" title="25.19 The INFORMATION_SCHEMA PROCESSLIST Table"><code class="literal">PROCESSLIST</code></a> table and
      <a class="link" href="sql-syntax.html#show-processlist" title="13.7.6.29 SHOW PROCESSLIST Syntax"><code class="literal">SHOW PROCESSLIST</code></a> statement, which
      have negative performance consequences because they require a
      mutex, access to <a class="link" href="performance-schema.html#threads-table" title="26.12.17.5 The threads Table"><code class="literal">threads</code></a> does not
      require a mutex and has minimal impact on server performance. The
      <a class="link" href="performance-schema.html#threads-table" title="26.12.17.5 The threads Table"><code class="literal">threads</code></a> table also shows information
      about background threads, which the
      <a class="link" href="information-schema.html#processlist-table" title="25.19 The INFORMATION_SCHEMA PROCESSLIST Table"><code class="literal">PROCESSLIST</code></a> table and
      <a class="link" href="sql-syntax.html#show-processlist" title="13.7.6.29 SHOW PROCESSLIST Syntax"><code class="literal">SHOW PROCESSLIST</code></a> do not. This means
      that <a class="link" href="performance-schema.html#threads-table" title="26.12.17.5 The threads Table"><code class="literal">threads</code></a> can be used to monitor
      activity the other thread information sources cannot.
    </p><p>
      The following statements are equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST

SHOW FULL PROCESSLIST
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="profiling-table"></a>25.20 The INFORMATION_SCHEMA PROFILING Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569415008"></a><p>
      The <a class="link" href="information-schema.html#profiling-table" title="25.20 The INFORMATION_SCHEMA PROFILING Table"><code class="literal">PROFILING</code></a> table provides
      statement profiling information. Its contents correspond to the
      information produced by the <a class="link" href="sql-syntax.html#show-profile" title="13.7.6.30 SHOW PROFILE Syntax"><code class="literal">SHOW
      PROFILE</code></a> and <a class="link" href="sql-syntax.html#show-profiles" title="13.7.6.31 SHOW PROFILES Syntax"><code class="literal">SHOW PROFILES</code></a>
      statements (see <a class="xref" href="sql-syntax.html#show-profile" title="13.7.6.30 SHOW PROFILE Syntax">Section 13.7.6.30, “SHOW PROFILE Syntax”</a>). The table is
      empty unless the <a class="link" href="server-administration.html#sysvar_profiling"><code class="literal">profiling</code></a>
      session variable is set to 1.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        This table is deprecated and will be removed in a future MySQL
        release. Use the <a class="link" href="performance-schema.html" title="Chapter 26 MySQL Performance Schema">Performance
        Schema</a> instead; see
        <a class="xref" href="performance-schema.html#performance-schema-query-profiling" title="26.19.1 Query Profiling Using Performance Schema">Section 26.19.1, “Query Profiling Using Performance Schema”</a>.
</p>
</div>
<p>
      The <a class="link" href="information-schema.html#profiling-table" title="25.20 The INFORMATION_SCHEMA PROFILING Table"><code class="literal">PROFILING</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">QUERY_ID</code>
        </p><p>
          A numeric statement identifier.
        </p></li><li class="listitem"><p>
          <code class="literal">SEQ</code>
        </p><p>
          A sequence number indicating the display order for rows with
          the same <code class="literal">QUERY_ID</code> value.
        </p></li><li class="listitem"><p>
          <code class="literal">STATE</code>
        </p><p>
          The profiling state to which the row measurements apply.
        </p></li><li class="listitem"><p>
          <code class="literal">DURATION</code>
        </p><p>
          How long statement execution remained in the given state, in
          seconds.
        </p></li><li class="listitem"><p>
          <code class="literal">CPU_USER</code>, <code class="literal">CPU_SYSTEM</code>
        </p><p>
          User and system CPU use, in seconds.
        </p></li><li class="listitem"><p>
          <code class="literal">CONTEXT_VOLUNTARY</code>,
          <code class="literal">CONTEXT_INVOLUNTARY</code>
        </p><p>
          How many voluntary and involuntary context switches occurred.
        </p></li><li class="listitem"><p>
          <code class="literal">BLOCK_OPS_IN</code>,
          <code class="literal">BLOCK_OPS_OUT</code>
        </p><p>
          The number of block input and output operations.
        </p></li><li class="listitem"><p>
          <code class="literal">MESSAGES_SENT</code>,
          <code class="literal">MESSAGES_RECEIVED</code>
        </p><p>
          The number of communication messages sent and received.
        </p></li><li class="listitem"><p>
          <code class="literal">PAGE_FAULTS_MAJOR</code>,
          <code class="literal">PAGE_FAULTS_MINOR</code>
        </p><p>
          The number of major and minor page faults.
        </p></li><li class="listitem"><p>
          <code class="literal">SWAPS</code>
        </p><p>
          How many swaps occurred.
        </p></li><li class="listitem"><p>
          <code class="literal">SOURCE_FUNCTION</code>,
          <code class="literal">SOURCE_FILE</code>, and
          <code class="literal">SOURCE_LINE</code>
        </p><p>
          Information indicating where in the source code the profiled
          state executes.
</p></li></ul>
</div>
<h3><a name="idm140091569375888"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The <a class="link" href="information-schema.html#profiling-table" title="25.20 The INFORMATION_SCHEMA PROFILING Table"><code class="literal">PROFILING</code></a> table is a
          nonstandard <code class="literal">INFORMATION_SCHEMA</code> table.
</p></li></ul>
</div>
<p>
      Profiling information is also available from the
      <a class="link" href="sql-syntax.html#show-profile" title="13.7.6.30 SHOW PROFILE Syntax"><code class="literal">SHOW PROFILE</code></a> and
      <a class="link" href="sql-syntax.html#show-profiles" title="13.7.6.31 SHOW PROFILES Syntax"><code class="literal">SHOW PROFILES</code></a> statements. See
      <a class="xref" href="sql-syntax.html#show-profile" title="13.7.6.30 SHOW PROFILE Syntax">Section 13.7.6.30, “SHOW PROFILE Syntax”</a>. For example, the following queries
      are equivalent:
    </p><pre data-lang="sql" class="programlisting">
SHOW PROFILE FOR QUERY 2;

SELECT STATE, FORMAT(DURATION, 6) AS DURATION
FROM INFORMATION_SCHEMA.PROFILING
WHERE QUERY_ID = 2 ORDER BY SEQ;
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="referential-constraints-table"></a>25.21 The INFORMATION_SCHEMA REFERENTIAL_CONSTRAINTS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569366064"></a><p>
      The <a class="link" href="information-schema.html#referential-constraints-table" title="25.21 The INFORMATION_SCHEMA REFERENTIAL_CONSTRAINTS Table"><code class="literal">REFERENTIAL_CONSTRAINTS</code></a> table
      provides information about foreign keys.
    </p><p>
      The <a class="link" href="information-schema.html#referential-constraints-table" title="25.21 The INFORMATION_SCHEMA REFERENTIAL_CONSTRAINTS Table"><code class="literal">REFERENTIAL_CONSTRAINTS</code></a> table has
      these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">CONSTRAINT_CATALOG</code>
        </p><p>
          The name of the catalog to which the constraint belongs. This
          value is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">CONSTRAINT_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the constraint
          belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">CONSTRAINT_NAME</code>
        </p><p>
          The name of the constraint.
        </p></li><li class="listitem"><p>
          <code class="literal">UNIQUE_CONSTRAINT_CATALOG</code>
        </p><p>
          The name of the catalog containing the unique constraint that
          the constraint references. This value is always
          <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">UNIQUE_CONSTRAINT_SCHEMA</code>
        </p><p>
          The name of the schema containing the unique constraint that
          the constraint references.
        </p></li><li class="listitem"><p>
          <code class="literal">UNIQUE_CONSTRAINT_NAME</code>
        </p><p>
          The name of the unique constraint that the constraint
          references.
        </p></li><li class="listitem"><p>
          <code class="literal">MATCH_OPTION</code>
        </p><p>
          The value of the constraint <code class="literal">MATCH</code>
          attribute. The only valid value at this time is
          <code class="literal">NONE</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">UPDATE_RULE</code>
        </p><p>
          The value of the constraint <code class="literal">ON UPDATE</code>
          attribute. The possible values are <code class="literal">CASCADE</code>,
          <code class="literal">SET NULL</code>, <code class="literal">SET DEFAULT</code>,
          <code class="literal">RESTRICT</code>, <code class="literal">NO ACTION</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">DELETE_RULE</code>
        </p><p>
          The value of the constraint <code class="literal">ON DELETE</code>
          attribute. The possible values are <code class="literal">CASCADE</code>,
          <code class="literal">SET NULL</code>, <code class="literal">SET DEFAULT</code>,
          <code class="literal">RESTRICT</code>, <code class="literal">NO ACTION</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the table. This value is the same as in the
          <a class="link" href="information-schema.html#table-constraints-table" title="25.32 The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table"><code class="literal">TABLE_CONSTRAINTS</code></a> table.
        </p></li><li class="listitem"><p>
          <code class="literal">REFERENCED_TABLE_NAME</code>
        </p><p>
          The name of the table referenced by the constraint.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="resource-groups-table"></a>25.22 The INFORMATION_SCHEMA RESOURCE_GROUPS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569325616"></a><p>
      The <a class="link" href="information-schema.html#resource-groups-table" title="25.22 The INFORMATION_SCHEMA RESOURCE_GROUPS Table"><code class="literal">RESOURCE_GROUPS</code></a> table provides
      access to information about resource groups. For general
      discussion of the resource group capability, see
      <a class="xref" href="optimization.html#resource-groups" title="8.12.5 Resource Groups">Section 8.12.5, “Resource Groups”</a>.
    </p><p>
      You can see information only for columns for which you have some
      privilege.
    </p><p>
      The <a class="link" href="information-schema.html#resource-groups-table" title="25.22 The INFORMATION_SCHEMA RESOURCE_GROUPS Table"><code class="literal">RESOURCE_GROUPS</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">RESOURCE_GROUP_NAME</code>
        </p><p>
          The name of the resource group.
        </p></li><li class="listitem"><p>
          <code class="literal">RESOURCE_GROUP_TYPE</code>
        </p><p>
          The resource group type, either <code class="literal">SYSTEM</code> or
          <code class="literal">USER</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">RESOURCE_GROUP_ENABLED</code>
        </p><p>
          Whether the resource group is enabled (1) or disabled (0);
        </p></li><li class="listitem"><p>
          <code class="literal">VCPU_IDS</code>
        </p><p>
          The CPU affinity; that is, the set of virtual CPUs that the
          resource group can use. The value is a list of comma-separated
          CPU numbers or ranges.
        </p></li><li class="listitem"><p>
          <code class="literal">THREAD_PRIORITY</code>
        </p><p>
          The priority for threads assigned to the resource group. The
          priority ranges from -20 (highest priority) to 19 (lowest
          priority). System resource groups have a priority that ranges
          from -20 to 0. User resource groups have a priority that
          ranges from 0 to 19.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="routines-table"></a>25.23 The INFORMATION_SCHEMA ROUTINES Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569306528"></a><p>
      The <a class="link" href="information-schema.html#routines-table" title="25.23 The INFORMATION_SCHEMA ROUTINES Table"><code class="literal">ROUTINES</code></a> table provides
      information about stored routines (stored procedures and stored
      functions). The <a class="link" href="information-schema.html#routines-table" title="25.23 The INFORMATION_SCHEMA ROUTINES Table"><code class="literal">ROUTINES</code></a> table does
      not include built-in SQL functions or user-defined functions
      (UDFs).
    </p><p>
      The <a class="link" href="information-schema.html#routines-table" title="25.23 The INFORMATION_SCHEMA ROUTINES Table"><code class="literal">ROUTINES</code></a> table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">SPECIFIC_NAME</code>
        </p><p>
          The name of the routine.
        </p></li><li class="listitem"><p>
          <code class="literal">ROUTINE_CATALOG</code>
        </p><p>
          The name of the catalog to which the routine belongs. This
          value is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">ROUTINE_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the routine
          belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">ROUTINE_NAME</code>
        </p><p>
          The name of the routine.
        </p></li><li class="listitem"><p>
          <code class="literal">ROUTINE_TYPE</code>
        </p><p>
          <code class="literal">PROCEDURE</code> for stored procedures,
          <code class="literal">FUNCTION</code> for stored functions.
        </p></li><li class="listitem"><p>
          <code class="literal">DATA_TYPE</code>
        </p><p>
          If the routine is a stored function, the return value data
          type. If the routine is a stored procedure, this value is
          empty.
        </p><p>
          The <code class="literal">DATA_TYPE</code> value is the type name only
          with no other information. The
          <code class="literal">DTD_IDENTIFIER</code> value contains the type name
          and possibly other information such as the precision or
          length.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_MAXIMUM_LENGTH</code>
        </p><p>
          For stored function string return values, the maximum length
          in characters. If the routine is a stored procedure, this
          value is <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_OCTET_LENGTH</code>
        </p><p>
          For stored function string return values, the maximum length
          in bytes. If the routine is a stored procedure, this value is
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">NUMERIC_PRECISION</code>
        </p><p>
          For stored function numeric return values, the numeric
          precision. If the routine is a stored procedure, this value is
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">NUMERIC_SCALE</code>
        </p><p>
          For stored function numeric return values, the numeric scale.
          If the routine is a stored procedure, this value is
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">DATETIME_PRECISION</code>
        </p><p>
          For stored function temporal return values, the fractional
          seconds precision. If the routine is a stored procedure, this
          value is <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_SET_NAME</code>
        </p><p>
          For stored function character string return values, the
          character set name. If the routine is a stored procedure, this
          value is <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">COLLATION_NAME</code>
        </p><p>
          For stored function character string return values, the
          collation name. If the routine is a stored procedure, this
          value is <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">DTD_IDENTIFIER</code>
        </p><p>
          If the routine is a stored function, the return value data
          type. If the routine is a stored procedure, this value is
          empty.
        </p><p>
          The <code class="literal">DATA_TYPE</code> value is the type name only
          with no other information. The
          <code class="literal">DTD_IDENTIFIER</code> value contains the type name
          and possibly other information such as the precision or
          length.
        </p></li><li class="listitem"><p>
          <code class="literal">ROUTINE_BODY</code>
        </p><p>
          The language used for the routine definition. This value is
          always <code class="literal">SQL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">ROUTINE_DEFINITION</code>
        </p><p>
          The text of the SQL statement executed by the routine.
        </p></li><li class="listitem"><p>
          <code class="literal">EXTERNAL_NAME</code>
        </p><p>
          This value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">EXTERNAL_LANGUAGE</code>
        </p><p>
          The language of the stored routine. The value is read from the
          <code class="literal">external_language</code> column of the
          <code class="literal">mysql.routines</code> data dictionary table.
        </p></li><li class="listitem"><p>
          <code class="literal">PARAMETER_STYLE</code>
        </p><p>
          This value is always <code class="literal">SQL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">IS_DETERMINISTIC</code>
        </p><p>
          <code class="literal">YES</code> or <code class="literal">NO</code>, depending on
          whether the routine is defined with the
          <code class="literal">DETERMINISTIC</code> characteristic.
        </p></li><li class="listitem"><p>
          <code class="literal">SQL_DATA_ACCESS</code>
        </p><p>
          The data access characteristic for the routine. The value is
          one of <code class="literal">CONTAINS SQL</code>, <code class="literal">NO
          SQL</code>, <code class="literal">READS SQL DATA</code>, or
          <code class="literal">MODIFIES SQL DATA</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">SQL_PATH</code>
        </p><p>
          This value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">SECURITY_TYPE</code>
        </p><p>
          The routine <code class="literal">SQL SECURITY</code> characteristic.
          The value is one of <code class="literal">DEFINER</code> or
          <code class="literal">INVOKER</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">CREATED</code>
        </p><p>
          The date and time when the routine was created. This is a
          <a class="link" href="data-types.html#datetime" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">TIMESTAMP</code></a> value.
        </p></li><li class="listitem"><p>
          <code class="literal">LAST_ALTERED</code>
        </p><p>
          The date and time when the routine was last modified. This is
          a <a class="link" href="data-types.html#datetime" title="11.3.1 The DATE, DATETIME, and TIMESTAMP Types"><code class="literal">TIMESTAMP</code></a> value. If the
          routine has not been modified since its creation, this value
          is the same as the <code class="literal">CREATED</code> value.
        </p></li><li class="listitem"><p>
          <code class="literal">SQL_MODE</code>
        </p><p>
          The SQL mode in effect when the routine was created or
          altered, and under which the routine executes. For the
          permitted values, see <a class="xref" href="server-administration.html#sql-mode" title="5.1.11 Server SQL Modes">Section 5.1.11, “Server SQL Modes”</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">ROUTINE_COMMENT</code>
        </p><p>
          The text of the comment, if the routine has one. If not, this
          value is empty.
        </p></li><li class="listitem"><p>
          <code class="literal">DEFINER</code>
        </p><p>
          The account of the user who created the routine, in
          <code class="literal">'<em class="replaceable"><code>user_name</code></em>'@'<em class="replaceable"><code>host_name</code></em>'</code>
          format.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_SET_CLIENT</code>
        </p><p>
          The session value of the
          <a class="link" href="server-administration.html#sysvar_character_set_client"><code class="literal">character_set_client</code></a> system
          variable when the routine was created.
        </p></li><li class="listitem"><p>
          <code class="literal">COLLATION_CONNECTION</code>
        </p><p>
          The session value of the
          <a class="link" href="server-administration.html#sysvar_collation_connection"><code class="literal">collation_connection</code></a> system
          variable when the routine was created.
        </p></li><li class="listitem"><p>
          <code class="literal">DATABASE_COLLATION</code>
        </p><p>
          The collation of the database with which the routine is
          associated.
</p></li></ul>
</div>
<h3><a name="idm140091569208672"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Information about stored function return values is also
          available in the <a class="link" href="information-schema.html#parameters-table" title="25.16 The INFORMATION_SCHEMA PARAMETERS Table"><code class="literal">PARAMETERS</code></a>
          table. The return value row for a stored function can be
          identified as the row that has an
          <code class="literal">ORDINAL_POSITION</code> value of 0.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="schemata-table"></a>25.24 The INFORMATION_SCHEMA SCHEMATA Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569203488"></a><p>
      A schema is a database, so the
      <a class="link" href="information-schema.html#schemata-table" title="25.24 The INFORMATION_SCHEMA SCHEMATA Table"><code class="literal">SCHEMATA</code></a> table provides information
      about databases.
    </p><p>
      The <a class="link" href="information-schema.html#schemata-table" title="25.24 The INFORMATION_SCHEMA SCHEMATA Table"><code class="literal">SCHEMATA</code></a> table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">CATALOG_NAME</code>
        </p><p>
          The name of the catalog to which the schema belongs. This
          value is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">SCHEMA_NAME</code>
        </p><p>
          The name of the schema.
        </p></li><li class="listitem"><p>
          <code class="literal">DEFAULT_CHARACTER_SET_NAME</code>
        </p><p>
          The schema default character set.
        </p></li><li class="listitem"><p>
          <code class="literal">DEFAULT_COLLATION_NAME</code>
        </p><p>
          The schema default collation.
        </p></li><li class="listitem"><p>
          <code class="literal">SQL_PATH</code>
        </p><p>
          This value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">DEFAULT_ENCRYPTION</code>
        </p><p>
          The schema default encryption. This column was added in MySQL
          8.0.16.
</p></li></ul>
</div>
<p>
      Schema names are also available from the <a class="link" href="sql-syntax.html#show-databases" title="13.7.6.14 SHOW DATABASES Syntax"><code class="literal">SHOW
      DATABASES</code></a> statement. See
      <a class="xref" href="sql-syntax.html#show-databases" title="13.7.6.14 SHOW DATABASES Syntax">Section 13.7.6.14, “SHOW DATABASES Syntax”</a>. The following statements are
      equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT SCHEMA_NAME AS `Database`
  FROM INFORMATION_SCHEMA.SCHEMATA
  [WHERE SCHEMA_NAME LIKE '<em class="replaceable"><code>wild</code></em>']

SHOW DATABASES
  [LIKE '<em class="replaceable"><code>wild</code></em>']
</pre><p>
      You see only those databases for which you have some kind of
      privilege, unless you have the global <a class="link" href="sql-syntax.html#show-databases" title="13.7.6.14 SHOW DATABASES Syntax"><code class="literal">SHOW
      DATABASES</code></a> privilege.
</p>
<div class="caution" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Caution
</div>
<p>
        Because any static global privilege is considered a privilege
        for all databases, any static global privilege enables a user to
        see all database names with <a class="link" href="sql-syntax.html#show-databases" title="13.7.6.14 SHOW DATABASES Syntax"><code class="literal">SHOW
        DATABASES</code></a> or by examining the
        <a class="link" href="information-schema.html#schemata-table" title="25.24 The INFORMATION_SCHEMA SCHEMATA Table"><code class="literal">SCHEMATA</code></a> table of
        <code class="literal">INFORMATION_SCHEMA</code>, except databases that
        have been restricted at the database level by partial revokes.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="schema-privileges-table"></a>25.25 The INFORMATION_SCHEMA SCHEMA_PRIVILEGES Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569173728"></a><p>
      The <a class="link" href="information-schema.html#schema-privileges-table" title="25.25 The INFORMATION_SCHEMA SCHEMA_PRIVILEGES Table"><code class="literal">SCHEMA_PRIVILEGES</code></a> table provides
      information about schema (database) privileges. It takes its
      values from the <code class="literal">mysql.db</code> system table.
    </p><p>
      The <a class="link" href="information-schema.html#schema-privileges-table" title="25.25 The INFORMATION_SCHEMA SCHEMA_PRIVILEGES Table"><code class="literal">SCHEMA_PRIVILEGES</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">GRANTEE</code>
        </p><p>
          The name of the account to which the privilege is granted, in
          <code class="literal">'<em class="replaceable"><code>user_name</code></em>'@'<em class="replaceable"><code>host_name</code></em>'</code>
          format.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_CATALOG</code>
        </p><p>
          The name of the catalog to which the schema belongs. This
          value is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_SCHEMA</code>
        </p><p>
          The name of the schema.
        </p></li><li class="listitem"><p>
          <code class="literal">PRIVILEGE_TYPE</code>
        </p><p>
          The privilege granted. The value can be any privilege that can
          be granted at the schema level; see <a class="xref" href="sql-syntax.html#grant" title="13.7.1.6 GRANT Syntax">Section 13.7.1.6, “GRANT Syntax”</a>.
          Each row lists a single privilege, so there is one row per
          schema privilege held by the grantee.
        </p></li><li class="listitem"><p>
          <code class="literal">IS_GRANTABLE</code>
        </p><p>
          <code class="literal">YES</code> if the user has the
          <a class="link" href="security.html#priv_grant-option"><code class="literal">GRANT OPTION</code></a> privilege,
          <code class="literal">NO</code> otherwise. The output does not list
          <a class="link" href="security.html#priv_grant-option"><code class="literal">GRANT OPTION</code></a> as a separate row
          with <code class="literal">PRIVILEGE_TYPE='GRANT OPTION'</code>.
</p></li></ul>
</div>
<h3><a name="idm140091569150352"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The <a class="link" href="information-schema.html#schema-privileges-table" title="25.25 The INFORMATION_SCHEMA SCHEMA_PRIVILEGES Table"><code class="literal">SCHEMA_PRIVILEGES</code></a> table is a
          nonstandard <code class="literal">INFORMATION_SCHEMA</code> table.
</p></li></ul>
</div>
<p>
      The following statements are <span class="emphasis"><em>not</em></span> equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT ... FROM INFORMATION_SCHEMA.SCHEMA_PRIVILEGES

SHOW GRANTS ...
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="statistics-table"></a>25.26 The INFORMATION_SCHEMA STATISTICS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569143408"></a><p>
      The <a class="link" href="information-schema.html#statistics-table" title="25.26 The INFORMATION_SCHEMA STATISTICS Table"><code class="literal">STATISTICS</code></a> table provides
      information about table indexes.
    </p><p>
      Columns in <a class="link" href="information-schema.html#statistics-table" title="25.26 The INFORMATION_SCHEMA STATISTICS Table"><code class="literal">STATISTICS</code></a> that represent
      table statistics hold cached values. The
      <a class="link" href="server-administration.html#sysvar_information_schema_stats_expiry"><code class="literal">information_schema_stats_expiry</code></a>
      system variable defines the period of time before cached table
      statistics expire. The default is 86400 seconds (24 hours). If
      there are no cached statistics or statistics have expired,
      statistics are retrieved from storage engines when querying table
      statistics columns. To update cached values at any time for a
      given table, use <a class="link" href="sql-syntax.html#analyze-table" title="13.7.3.1 ANALYZE TABLE Syntax"><code class="literal">ANALYZE TABLE</code></a>. To
      always retrieve the latest statistics directly from storage
      engines, set
      <a class="link" href="server-administration.html#sysvar_information_schema_stats_expiry"><code class="literal">information_schema_stats_expiry=0</code></a>.
      For more information, see
      <a class="xref" href="optimization.html#information-schema-optimization" title="8.2.3 Optimizing INFORMATION_SCHEMA Queries">Section 8.2.3, “Optimizing INFORMATION_SCHEMA Queries”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        If the <a class="link" href="innodb-storage-engine.html#sysvar_innodb_read_only"><code class="literal">innodb_read_only</code></a> system
        variable is enabled, <a class="link" href="sql-syntax.html#analyze-table" title="13.7.3.1 ANALYZE TABLE Syntax"><code class="literal">ANALYZE
        TABLE</code></a> may fail because it cannot update statistics
        tables in the data dictionary, which use
        <code class="literal">InnoDB</code>. For <a class="link" href="sql-syntax.html#analyze-table" title="13.7.3.1 ANALYZE TABLE Syntax"><code class="literal">ANALYZE
        TABLE</code></a> operations that update the key distribution,
        failure may occur even if the operation updates the table itself
        (for example, if it is a <code class="literal">MyISAM</code> table). To
        obtain the updated distribution statistics, set
        <a class="link" href="server-administration.html#sysvar_information_schema_stats_expiry"><code class="literal">information_schema_stats_expiry=0</code></a>.
</p>
</div>
<p>
      The <a class="link" href="information-schema.html#statistics-table" title="25.26 The INFORMATION_SCHEMA STATISTICS Table"><code class="literal">STATISTICS</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TABLE_CATALOG</code>
        </p><p>
          The name of the catalog to which the table containing the
          index belongs. This value is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the table
          containing the index belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the table containing the index.
        </p></li><li class="listitem"><p>
          <code class="literal">NON_UNIQUE</code>
        </p><p>
          0 if the index cannot contain duplicates, 1 if it can.
        </p></li><li class="listitem"><p>
          <code class="literal">INDEX_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the index belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">INDEX_NAME</code>
        </p><p>
          The name of the index. If the index is the primary key, the
          name is always <code class="literal">PRIMARY</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">SEQ_IN_INDEX</code>
        </p><p>
          The column sequence number in the index, starting with 1.
        </p></li><li class="listitem"><p>
          <code class="literal">COLUMN_NAME</code>
        </p><p>
          The column name. See also the description for the
          <code class="literal">EXPRESSION</code> column.
        </p></li><li class="listitem"><p>
          <code class="literal">COLLATION</code>
        </p><p>
          How the column is sorted in the index. This can have values
          <code class="literal">A</code> (ascending), <code class="literal">D</code>
          (descending), or <code class="literal">NULL</code> (not sorted).
        </p></li><li class="listitem"><p>
          <code class="literal">CARDINALITY</code>
        </p><p>
          An estimate of the number of unique values in the index. To
          update this number, run <a class="link" href="sql-syntax.html#analyze-table" title="13.7.3.1 ANALYZE TABLE Syntax"><code class="literal">ANALYZE
          TABLE</code></a> or (for <code class="literal">MyISAM</code> tables)
          <a class="link" href="programs.html#myisamchk" title="4.6.4 myisamchk — MyISAM Table-Maintenance Utility"><span class="command"><strong>myisamchk -a</strong></span></a>.
        </p><p>
          <code class="literal">CARDINALITY</code> is counted based on statistics
          stored as integers, so the value is not necessarily exact even
          for small tables. The higher the cardinality, the greater the
          chance that MySQL uses the index when doing joins.
        </p></li><li class="listitem"><p>
          <code class="literal">SUB_PART</code>
        </p><p>
          The index prefix. That is, the number of indexed characters if
          the column is only partly indexed, <code class="literal">NULL</code> if
          the entire column is indexed.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
            Prefix <span class="emphasis"><em>limits</em></span> are measured in bytes.
            However, prefix <span class="emphasis"><em>lengths</em></span> for index
            specifications in <a class="link" href="sql-syntax.html#create-table" title="13.1.20 CREATE TABLE Syntax"><code class="literal">CREATE
            TABLE</code></a>, <a class="link" href="sql-syntax.html#alter-table" title="13.1.9 ALTER TABLE Syntax"><code class="literal">ALTER TABLE</code></a>,
            and <a class="link" href="sql-syntax.html#create-index" title="13.1.15 CREATE INDEX Syntax"><code class="literal">CREATE INDEX</code></a> statements
            are interpreted as number of characters for nonbinary string
            types (<a class="link" href="data-types.html#char" title="11.4.1 The CHAR and VARCHAR Types"><code class="literal">CHAR</code></a>,
            <a class="link" href="data-types.html#char" title="11.4.1 The CHAR and VARCHAR Types"><code class="literal">VARCHAR</code></a>,
            <a class="link" href="data-types.html#blob" title="11.4.3 The BLOB and TEXT Types"><code class="literal">TEXT</code></a>) and number of bytes for
            binary string types (<a class="link" href="data-types.html#binary-varbinary" title="11.4.2 The BINARY and VARBINARY Types"><code class="literal">BINARY</code></a>,
            <a class="link" href="data-types.html#binary-varbinary" title="11.4.2 The BINARY and VARBINARY Types"><code class="literal">VARBINARY</code></a>,
            <a class="link" href="data-types.html#blob" title="11.4.3 The BLOB and TEXT Types"><code class="literal">BLOB</code></a>). Take this into account
            when specifying a prefix length for a nonbinary string
            column that uses a multibyte character set.
</p>
</div>
<p>
          For additional information about index prefixes, see
          <a class="xref" href="optimization.html#column-indexes" title="8.3.5 Column Indexes">Section 8.3.5, “Column Indexes”</a>, and
          <a class="xref" href="sql-syntax.html#create-index" title="13.1.15 CREATE INDEX Syntax">Section 13.1.15, “CREATE INDEX Syntax”</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">PACKED</code>
        </p><p>
          Indicates how the key is packed. <code class="literal">NULL</code> if it
          is not.
        </p></li><li class="listitem"><p>
          <code class="literal">NULLABLE</code>
        </p><p>
          Contains <code class="literal">YES</code> if the column may contain
          <code class="literal">NULL</code> values and <code class="literal">''</code> if
          not.
        </p></li><li class="listitem"><p>
          <code class="literal">INDEX_TYPE</code>
        </p><p>
          The index method used (<code class="literal">BTREE</code>,
          <code class="literal">FULLTEXT</code>, <code class="literal">HASH</code>,
          <code class="literal">RTREE</code>).
        </p></li><li class="listitem"><p>
          <code class="literal">COMMENT</code>
        </p><p>
          Information about the index not described in its own column,
          such as <code class="literal">disabled</code> if the index is disabled.
        </p></li><li class="listitem"><p>
          <code class="literal">INDEX_COMMENT</code>
        </p><p>
          Any comment provided for the index with a
          <code class="literal">COMMENT</code> attribute when the index was
          created.
        </p></li><li class="listitem"><p>
          <code class="literal">IS_VISIBLE</code>
        </p><p>
          Whether the index is visible to the optimizer. See
          <a class="xref" href="optimization.html#invisible-indexes" title="8.3.12 Invisible Indexes">Section 8.3.12, “Invisible Indexes”</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">EXPRESSION</code>
        </p><p>
          MySQL 8.0.13 and higher supports functional key parts (see
          <a class="xref" href="sql-syntax.html#create-index-functional-key-parts" title="Functional Key Parts">Functional Key Parts</a>), which
          affects both the <code class="literal">COLUMN_NAME</code> and
          <code class="literal">EXPRESSION</code> columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              For a nonfunctional key part,
              <code class="literal">COLUMN_NAME</code> indicates the column
              indexed by the key part and <code class="literal">EXPRESSION</code>
              is <code class="literal">NULL</code>.
            </p></li><li class="listitem"><p>
              For a functional key part, <code class="literal">COLUMN_NAME</code>
              column is <code class="literal">NULL</code> and
              <code class="literal">EXPRESSION</code> indicates the expression for
              the key part.
</p></li></ul>
</div>
</li></ul>
</div>
<h3><a name="idm140091569048208"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          There is no standard <code class="literal">INFORMATION_SCHEMA</code>
          table for indexes. The MySQL column list is similar to what
          SQL Server 2000 returns for <code class="literal">sp_statistics</code>,
          except that <code class="literal">QUALIFIER</code> and
          <code class="literal">OWNER</code> are replaced with
          <code class="literal">CATALOG</code> and <code class="literal">SCHEMA</code>,
          respectively.
</p></li></ul>
</div>
<p>
      Information about table indexes is also available from the
      <a class="link" href="sql-syntax.html#show-index" title="13.7.6.22 SHOW INDEX Syntax"><code class="literal">SHOW INDEX</code></a> statement. See
      <a class="xref" href="sql-syntax.html#show-index" title="13.7.6.22 SHOW INDEX Syntax">Section 13.7.6.22, “SHOW INDEX Syntax”</a>. The following statements are
      equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT * FROM INFORMATION_SCHEMA.STATISTICS
  WHERE table_name = '<em class="replaceable"><code>tbl_name</code></em>'
  AND table_schema = '<em class="replaceable"><code>db_name</code></em>'

SHOW INDEX
  FROM <em class="replaceable"><code>tbl_name</code></em>
  FROM <em class="replaceable"><code>db_name</code></em>
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="st-geometry-columns-table"></a>25.27 The INFORMATION_SCHEMA ST_GEOMETRY_COLUMNS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569035408"></a><p>
      The <a class="link" href="information-schema.html#st-geometry-columns-table" title="25.27 The INFORMATION_SCHEMA ST_GEOMETRY_COLUMNS Table"><code class="literal">ST_GEOMETRY_COLUMNS</code></a> table
      provides information about table columns that store spatial data.
      This table is based on the SQL/MM (ISO/IEC 13249-3) standard, with
      extensions as noted. MySQL implements
      <a class="link" href="information-schema.html#st-geometry-columns-table" title="25.27 The INFORMATION_SCHEMA ST_GEOMETRY_COLUMNS Table"><code class="literal">ST_GEOMETRY_COLUMNS</code></a> as a view on the
      <code class="literal">INFORMATION_SCHEMA</code>
      <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table.
    </p><p>
      The <a class="link" href="information-schema.html#st-geometry-columns-table" title="25.27 The INFORMATION_SCHEMA ST_GEOMETRY_COLUMNS Table"><code class="literal">ST_GEOMETRY_COLUMNS</code></a> table has
      these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TABLE_CATALOG</code>
        </p><p>
          The name of the catalog to which the table containing the
          column belongs. This value is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the table
          containing the column belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the table containing the column.
        </p></li><li class="listitem"><p>
          <code class="literal">COLUMN_NAME</code>
        </p><p>
          The name of the column.
        </p></li><li class="listitem"><p>
          <code class="literal">SRS_NAME</code>
        </p><p>
          The spatial reference system (SRS) name.
        </p></li><li class="listitem"><p>
          <code class="literal">SRS_ID</code>
        </p><p>
          The spatial reference system ID (SRID).
        </p></li><li class="listitem"><p>
          <code class="literal">GEOMETRY_TYPE_NAME</code>
        </p><p>
          The column data type. Permitted values are:
          <code class="literal">geometry</code>, <code class="literal">point</code>,
          <code class="literal">linestring</code>, <code class="literal">polygon</code>,
          <code class="literal">multipoint</code>,
          <code class="literal">multilinestring</code>,
          <code class="literal">multipolygon</code>,
          <code class="literal">geometrycollection</code>. This column is a MySQL
          extension to the standard.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="st-spatial-reference-systems-table"></a>25.28 The INFORMATION_SCHEMA ST_SPATIAL_REFERENCE_SYSTEMS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091569005552"></a><p>
      The <a class="link" href="information-schema.html#st-spatial-reference-systems-table" title="25.28 The INFORMATION_SCHEMA ST_SPATIAL_REFERENCE_SYSTEMS Table"><code class="literal">ST_SPATIAL_REFERENCE_SYSTEMS</code></a>
      table provides information about available spatial reference
      systems for spatial data. This table is based on the SQL/MM
      (ISO/IEC 13249-3) standard.
    </p><p>
      Entries in the
      <a class="link" href="information-schema.html#st-spatial-reference-systems-table" title="25.28 The INFORMATION_SCHEMA ST_SPATIAL_REFERENCE_SYSTEMS Table"><code class="literal">ST_SPATIAL_REFERENCE_SYSTEMS</code></a> table
      are based on the <a class="ulink" href="http://epsg.org" target="_top">European Petroleum
      Survey Group</a> (EPSG) data set, except for SRID 0, which
      corresponds to a special SRS used in MySQL that represents an
      infinite flat Cartesian plane with no units assigned to its axes.
      For additional information about SRSs, see
      <a class="xref" href="data-types.html#spatial-reference-systems" title="11.5.5 Spatial Reference System Support">Section 11.5.5, “Spatial Reference System Support”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#st-spatial-reference-systems-table" title="25.28 The INFORMATION_SCHEMA ST_SPATIAL_REFERENCE_SYSTEMS Table"><code class="literal">ST_SPATIAL_REFERENCE_SYSTEMS</code></a>
      table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">SRS_NAME</code>
        </p><p>
          The spatial reference system name. This value is unique.
        </p></li><li class="listitem"><p>
          <code class="literal">SRS_ID</code>
        </p><p>
          The spatial reference system numeric ID. This value is unique.
        </p><p>
          <code class="literal">SRS_ID</code> values represent the same kind of
          values passed as the SRID argument to spatial functions. SRID
          0 (the unitless Cartesian plane) is special. It is always a
          legal spatial reference system ID and can be used in any
          computations on spatial data that depend on SRID values.
        </p></li><li class="listitem"><p>
          <code class="literal">ORGANIZATION</code>
        </p><p>
          The name of the organization that defined the coordinate
          system on which the spatial reference system is based.
        </p></li><li class="listitem"><p>
          <code class="literal">ORGANIZATION_COORDSYS_ID</code>
        </p><p>
          The numeric ID given to the spatial reference system by the
          organization that defined it.
        </p></li><li class="listitem"><p>
          <code class="literal">DEFINITION</code>
        </p><p>
          The spatial reference system definition.
          <code class="literal">DEFINITION</code> values are WKT values,
          represented as specified in the
          <a class="ulink" href="http://www.opengeospatial.org" target="_top">Open Geospatial
          Consortium</a> document
          <a class="ulink" href="http://docs.opengeospatial.org/is/12-063r5/12-063r5.html" target="_top">OGC
          12-063r5</a>.
        </p><p>
          SRS definition parsing occurs on demand when definitions are
          needed by GIS functions. Parsed definitions are cached in the
          data dictionary cache so that parsing overhead is not incurred
          for every statement that needs SRS information.
        </p></li><li class="listitem"><p>
          <code class="literal">DESCRIPTION</code>
        </p><p>
          The spatial reference system description.
</p></li></ul>
</div>
<h3><a name="idm140091568980640"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The <code class="literal">SRS_NAME</code>,
          <code class="literal">ORGANIZATION</code>,
          <code class="literal">ORGANIZATION_COORDSYS_ID</code>, and
          <code class="literal">DESCRIPTION</code> columns contain information
          that may be of interest to users, but they are not used by
          MySQL.
</p></li></ul>
</div>
<h3><a name="idm140091568975760"></a>Example</h3>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM ST_SPATIAL_REFERENCE_SYSTEMS</code></strong>
       <strong class="userinput"><code>WHERE SRS_ID = 4326\G</code></strong>
*************************** 1. row ***************************
                SRS_NAME: WGS 84
                  SRS_ID: 4326
            ORGANIZATION: EPSG
ORGANIZATION_COORDSYS_ID: 4326
              DEFINITION: GEOGCS["WGS 84",DATUM["World Geodetic System 1984",
                          SPHEROID["WGS 84",6378137,298.257223563,
                          AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],
                          PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],
                          UNIT["degree",0.017453292519943278,
                          AUTHORITY["EPSG","9122"]],
                          AXIS["Lat",NORTH],AXIS["Long",EAST],
                          AUTHORITY["EPSG","4326"]]
             DESCRIPTION:
</pre><p>
      This entry describes the SRS used for GPS systems. It has a name
      (<code class="literal">SRS_NAME</code>) of WGS 84 and an ID
      (<code class="literal">SRS_ID</code>) of 4326, which is the ID used by the
      <a class="ulink" href="http://epsg.org" target="_top">European Petroleum Survey
      Group</a> (EPSG).
    </p><p>
      The <code class="literal">DEFINITION</code> values for projected and
      geographic SRSs begin with <code class="literal">PROJCS</code> and
      <code class="literal">GEOGCS</code>, respectively. The definition for SRID 0
      is special and has an empty <code class="literal">DEFINITION</code> value.
      The following query determines how many entries in the
      <a class="link" href="information-schema.html#st-spatial-reference-systems-table" title="25.28 The INFORMATION_SCHEMA ST_SPATIAL_REFERENCE_SYSTEMS Table"><code class="literal">ST_SPATIAL_REFERENCE_SYSTEMS</code></a> table
      correspond to projected, geographic, and other SRSs, based on
      <code class="literal">DEFINITION</code> values:
    </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT</code></strong>
         <strong class="userinput"><code>COUNT(*),</code></strong>
         <strong class="userinput"><code>CASE LEFT(DEFINITION, 6)</code></strong>
           <strong class="userinput"><code>WHEN 'PROJCS' THEN 'Projected'</code></strong>
           <strong class="userinput"><code>WHEN 'GEOGCS' THEN 'Geographic'</code></strong>
           <strong class="userinput"><code>ELSE 'Other'</code></strong>
         <strong class="userinput"><code>END AS SRS_TYPE</code></strong>
       <strong class="userinput"><code>FROM ST_SPATIAL_REFERENCE_SYSTEMS</code></strong>
       <strong class="userinput"><code>GROUP BY SRS_TYPE;</code></strong>
+----------+------------+
| COUNT(*) | SRS_TYPE   |
+----------+------------+
|        1 | Other      |
|     4668 | Projected  |
|      483 | Geographic |
+----------+------------+
</pre><p>
      To enable manipulation of SRS entries stored in the data
      dictionary, MySQL provides these SQL statements:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <a class="link" href="sql-syntax.html#create-spatial-reference-system" title="13.1.19 CREATE SPATIAL REFERENCE SYSTEM Syntax"><code class="literal">CREATE SPATIAL REFERENCE
          SYSTEM</code></a>: See
          <a class="xref" href="sql-syntax.html#create-spatial-reference-system" title="13.1.19 CREATE SPATIAL REFERENCE SYSTEM Syntax">Section 13.1.19, “CREATE SPATIAL REFERENCE SYSTEM Syntax”</a>. The
          description for this statement includes additional information
          about SRS components.
        </p></li><li class="listitem"><p>
          <a class="link" href="sql-syntax.html#drop-spatial-reference-system" title="13.1.31 DROP SPATIAL REFERENCE SYSTEM Syntax"><code class="literal">DROP SPATIAL REFERENCE SYSTEM</code></a>:
          See <a class="xref" href="sql-syntax.html#drop-spatial-reference-system" title="13.1.31 DROP SPATIAL REFERENCE SYSTEM Syntax">Section 13.1.31, “DROP SPATIAL REFERENCE SYSTEM Syntax”</a>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="st-units-of-measure-table"></a>25.29 The INFORMATION_SCHEMA ST_UNITS_OF_MEASURE Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091568947808"></a><p>
      The <a class="link" href="information-schema.html#st-units-of-measure-table" title="25.29 The INFORMATION_SCHEMA ST_UNITS_OF_MEASURE Table"><code class="literal">ST_UNITS_OF_MEASURE</code></a> table
      (available as of MySQL 8.0.14) provides information about
      acceptable units for the
      <a class="link" href="functions.html#function_st-distance"><code class="literal">ST_Distance()</code></a> function.
    </p><p>
      The <a class="link" href="information-schema.html#st-units-of-measure-table" title="25.29 The INFORMATION_SCHEMA ST_UNITS_OF_MEASURE Table"><code class="literal">ST_UNITS_OF_MEASURE</code></a> table has
      these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">UNIT_NAME</code>
        </p><p>
          The name of the unit.
        </p></li><li class="listitem"><p>
          <code class="literal">UNIT_TYPE</code>
        </p><p>
          The unit type (for example, <code class="literal">LINEAR</code>).
        </p></li><li class="listitem"><p>
          <code class="literal">CONVERSION_FACTOR</code>
        </p><p>
          A conversion factor used for internal calculations.
        </p></li><li class="listitem"><p>
          <code class="literal">DESCRIPTION</code>
        </p><p>
          A description of the unit.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="tables-table"></a>25.30 The INFORMATION_SCHEMA TABLES Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091568931712"></a><p>
      The <a class="link" href="information-schema.html#tables-table" title="25.30 The INFORMATION_SCHEMA TABLES Table"><code class="literal">TABLES</code></a> table provides information
      about tables in databases.
    </p><p>
      Columns in <a class="link" href="information-schema.html#tables-table" title="25.30 The INFORMATION_SCHEMA TABLES Table"><code class="literal">TABLES</code></a> that represent
      table statistics hold cached values. The
      <a class="link" href="server-administration.html#sysvar_information_schema_stats_expiry"><code class="literal">information_schema_stats_expiry</code></a>
      system variable defines the period of time before cached table
      statistics expire. The default is 86400 seconds (24 hours). If
      there are no cached statistics or statistics have expired,
      statistics are retrieved from storage engines when querying table
      statistics columns. To update cached values at any time for a
      given table, use <a class="link" href="sql-syntax.html#analyze-table" title="13.7.3.1 ANALYZE TABLE Syntax"><code class="literal">ANALYZE TABLE</code></a>. To
      always retrieve the latest statistics directly from storage
      engines, set
      <a class="link" href="server-administration.html#sysvar_information_schema_stats_expiry"><code class="literal">information_schema_stats_expiry</code></a>
      to <code class="literal">0</code>. For more information, see
      <a class="xref" href="optimization.html#information-schema-optimization" title="8.2.3 Optimizing INFORMATION_SCHEMA Queries">Section 8.2.3, “Optimizing INFORMATION_SCHEMA Queries”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        If the <a class="link" href="innodb-storage-engine.html#sysvar_innodb_read_only"><code class="literal">innodb_read_only</code></a> system
        variable is enabled, <a class="link" href="sql-syntax.html#analyze-table" title="13.7.3.1 ANALYZE TABLE Syntax"><code class="literal">ANALYZE
        TABLE</code></a> may fail because it cannot update statistics
        tables in the data dictionary, which use
        <code class="literal">InnoDB</code>. For <a class="link" href="sql-syntax.html#analyze-table" title="13.7.3.1 ANALYZE TABLE Syntax"><code class="literal">ANALYZE
        TABLE</code></a> operations that update the key distribution,
        failure may occur even if the operation updates the table itself
        (for example, if it is a <code class="literal">MyISAM</code> table). To
        obtain the updated distribution statistics, set
        <a class="link" href="server-administration.html#sysvar_information_schema_stats_expiry"><code class="literal">information_schema_stats_expiry=0</code></a>.
</p>
</div>
<p>
      The <a class="link" href="information-schema.html#tables-table" title="25.30 The INFORMATION_SCHEMA TABLES Table"><code class="literal">TABLES</code></a> table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TABLE_CATALOG</code>
        </p><p>
          The name of the catalog to which the table belongs. This value
          is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the table belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the table.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_TYPE</code>
        </p><p>
          <code class="literal">BASE TABLE</code> for a table,
          <code class="literal">VIEW</code> for a view, or <code class="literal">SYSTEM
          VIEW</code> for an <code class="literal">INFORMATION_SCHEMA</code>
          table.
        </p><p>
          The <a class="link" href="information-schema.html#tables-table" title="25.30 The INFORMATION_SCHEMA TABLES Table"><code class="literal">TABLES</code></a> table does not list
          <code class="literal">TEMPORARY</code> tables.
        </p></li><li class="listitem"><p>
          <code class="literal">ENGINE</code>
        </p><p>
          The storage engine for the table. See
          <a class="xref" href="innodb-storage-engine.html" title="Chapter 15 The InnoDB Storage Engine">Chapter 15, <i>The InnoDB Storage Engine</i></a>, and
          <a class="xref" href="storage-engines.html" title="Chapter 16 Alternative Storage Engines">Chapter 16, <i>Alternative Storage Engines</i></a>.
        </p><p>
          For partitioned tables, <code class="literal">ENGINE</code> shows the
          name of the storage engine used by all partitions.
        </p></li><li class="listitem"><p>
          <code class="literal">VERSION</code>
        </p><p>
          This column is unused. With the removal of
          <code class="filename">.frm</code> files in MySQL 8.0, this column now
          reports a hardcoded value of <code class="literal">10</code>, which is
          the last <code class="filename">.frm</code> file version used in MySQL
          5.7.
        </p></li><li class="listitem"><p>
          <code class="literal">ROW_FORMAT</code>
        </p><p>
          The row-storage format (<code class="literal">Fixed</code>,
          <code class="literal">Dynamic</code>, <code class="literal">Compressed</code>,
          <code class="literal">Redundant</code>, <code class="literal">Compact</code>). For
          <code class="literal">MyISAM</code> tables, <code class="literal">Dynamic</code>
          corresponds to what <a class="link" href="programs.html#myisamchk" title="4.6.4 myisamchk — MyISAM Table-Maintenance Utility"><span class="command"><strong>myisamchk -dvv</strong></span></a> reports
          as <code class="literal">Packed</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_ROWS</code>
        </p><p>
          The number of rows. Some storage engines, such as
          <code class="literal">MyISAM</code>, store the exact count. For other
          storage engines, such as <code class="literal">InnoDB</code>, this value
          is an approximation, and may vary from the actual value by as
          much as 40% to 50%. In such cases, use <code class="literal">SELECT
          COUNT(*)</code> to obtain an accurate count.
        </p><p>
          <code class="literal">TABLE_ROWS</code> is <code class="literal">NULL</code> for
          <code class="literal">INFORMATION_SCHEMA</code> tables.
        </p><p>
          For <a class="link" href="innodb-storage-engine.html" title="Chapter 15 The InnoDB Storage Engine"><code class="literal">InnoDB</code></a> tables, the row count
          is only a rough estimate used in SQL optimization. (This is
          also true if the <a class="link" href="innodb-storage-engine.html" title="Chapter 15 The InnoDB Storage Engine"><code class="literal">InnoDB</code></a> table is
          partitioned.)
        </p></li><li class="listitem"><p>
          <code class="literal">AVG_ROW_LENGTH</code>
        </p><p>
          The average row length.
        </p></li><li class="listitem"><p>
          <code class="literal">DATA_LENGTH</code>
        </p><p>
          For <code class="literal">MyISAM</code>, <code class="literal">DATA_LENGTH</code>
          is the length of the data file, in bytes.
        </p><p>
          For <code class="literal">InnoDB</code>, <code class="literal">DATA_LENGTH</code>
          is the approximate amount of memory allocated for the
          clustered index, in bytes. Specifically, it is the clustered
          index size, in pages, multiplied by the
          <code class="literal">InnoDB</code> page size.
        </p><p>
          Refer to the notes at the end of this section for information
          regarding other storage engines.
        </p></li><li class="listitem"><p>
          <code class="literal">MAX_DATA_LENGTH</code>
        </p><p>
          For <code class="literal">MyISAM</code>,
          <code class="literal">MAX_DATA_LENGTH</code> is maximum length of the
          data file. This is the total number of bytes of data that can
          be stored in the table, given the data pointer size used.
        </p><p>
          Unused for <code class="literal">InnoDB</code>.
        </p><p>
          Refer to the notes at the end of this section for information
          regarding other storage engines.
        </p></li><li class="listitem"><p>
          <code class="literal">INDEX_LENGTH</code>
        </p><p>
          For <code class="literal">MyISAM</code>, <code class="literal">INDEX_LENGTH</code>
          is the length of the index file, in bytes.
        </p><p>
          For <code class="literal">InnoDB</code>, <code class="literal">INDEX_LENGTH</code>
          is the approximate amount of memory allocated for
          non-clustered indexes, in bytes. Specifically, it is the sum
          of non-clustered index sizes, in pages, multiplied by the
          <code class="literal">InnoDB</code> page size.
        </p><p>
          Refer to the notes at the end of this section for information
          regarding other storage engines.
        </p></li><li class="listitem"><p>
          <code class="literal">DATA_FREE</code>
        </p><p>
          The number of allocated but unused bytes.
        </p><p>
          <code class="literal">InnoDB</code> tables report the free space of the
          tablespace to which the table belongs. For a table located in
          the shared tablespace, this is the free space of the shared
          tablespace. If you are using multiple tablespaces and the
          table has its own tablespace, the free space is for only that
          table. Free space means the number of bytes in completely free
          extents minus a safety margin. Even if free space displays as
          0, it may be possible to insert rows as long as new extents
          need not be allocated.
        </p><p>
          For NDB Cluster, <code class="literal">DATA_FREE</code> shows the space
          allocated on disk for, but not used by, a Disk Data table or
          fragment on disk. (In-memory data resource usage is reported
          by the <code class="literal">DATA_LENGTH</code> column.)
        </p><p>
          For partitioned tables, this value is only an estimate and may
          not be absolutely correct. A more accurate method of obtaining
          this information in such cases is to query the
          <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#partitions-table" title="25.17 The INFORMATION_SCHEMA PARTITIONS Table"><code class="literal">PARTITIONS</code></a> table, as shown in
          this example:
        </p><pre data-lang="sql" class="programlisting">
SELECT SUM(DATA_FREE)
    FROM  INFORMATION_SCHEMA.PARTITIONS
    WHERE TABLE_SCHEMA = 'mydb'
    AND   TABLE_NAME   = 'mytable';
</pre><p>
          For more information, see <a class="xref" href="information-schema.html#partitions-table" title="25.17 The INFORMATION_SCHEMA PARTITIONS Table">Section 25.17, “The INFORMATION_SCHEMA PARTITIONS Table”</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">AUTO_INCREMENT</code>
        </p><p>
          The next <code class="literal">AUTO_INCREMENT</code> value.
        </p></li><li class="listitem"><p>
          <code class="literal">CREATE_TIME</code>
        </p><p>
          When the table was created.
        </p></li><li class="listitem"><p>
          <code class="literal">UPDATE_TIME</code>
        </p><p>
          When the data file was last updated. For some storage engines,
          this value is <code class="literal">NULL</code>. For example,
          <code class="literal">InnoDB</code> stores multiple tables in its
          <a class="link" href="glossary.html#glos_system_tablespace" title="system tablespace">system
          tablespace</a> and the data file timestamp does not apply.
          Even with
          <a class="link" href="glossary.html#glos_file_per_table" title="file-per-table">file-per-table</a> mode
          with each <code class="literal">InnoDB</code> table in a separate
          <code class="literal">.ibd</code> file,
          <a class="link" href="glossary.html#glos_change_buffering" title="change buffering">change buffering</a>
          can delay the write to the data file, so the file modification
          time is different from the time of the last insert, update, or
          delete. For <code class="literal">MyISAM</code>, the data file timestamp
          is used; however, on Windows the timestamp is not updated by
          updates, so the value is inaccurate.
        </p><p>
          <code class="literal">UPDATE_TIME</code> displays a timestamp value for
          the last <a class="link" href="sql-syntax.html#update" title="13.2.12 UPDATE Syntax"><code class="literal">UPDATE</code></a>,
          <a class="link" href="sql-syntax.html#insert" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a>, or
          <a class="link" href="sql-syntax.html#delete" title="13.2.2 DELETE Syntax"><code class="literal">DELETE</code></a> performed on
          <code class="literal">InnoDB</code> tables that are not partitioned. For
          MVCC, the timestamp value reflects the
          <a class="link" href="sql-syntax.html#commit" title="13.3.1 START TRANSACTION, COMMIT, and ROLLBACK Syntax"><code class="literal">COMMIT</code></a> time, which is
          considered the last update time. Timestamps are not persisted
          when the server is restarted or when the table is evicted from
          the <code class="literal">InnoDB</code> data dictionary cache.
        </p></li><li class="listitem"><p>
          <code class="literal">CHECK_TIME</code>
        </p><p>
          When the table was last checked. Not all storage engines
          update this time, in which case, the value is always
          <code class="literal">NULL</code>.
        </p><p>
          For partitioned <a class="link" href="innodb-storage-engine.html" title="Chapter 15 The InnoDB Storage Engine"><code class="literal">InnoDB</code></a> tables,
          <code class="literal">CHECK_TIME</code> is always
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_COLLATION</code>
        </p><p>
          The table default collation. The output does not explicitly
          list the table default character set, but the collation name
          begins with the character set name.
        </p></li><li class="listitem"><p>
          <code class="literal">CHECKSUM</code>
        </p><p>
          The live checksum value, if any.
        </p></li><li class="listitem"><p>
          <code class="literal">CREATE_OPTIONS</code>
        </p><p>
          Extra options used with <a class="link" href="sql-syntax.html#create-table" title="13.1.20 CREATE TABLE Syntax"><code class="literal">CREATE
          TABLE</code></a>. The original options specified when
          <a class="link" href="sql-syntax.html#create-table" title="13.1.20 CREATE TABLE Syntax"><code class="literal">CREATE TABLE</code></a> was executed are
          retained. The information reported may differ from current
          table settings and options.
        </p><p>
          For <code class="literal">InnoDB</code> tables, the actual
          <code class="literal">ROW_FORMAT</code> and
          <code class="literal">KEY_BLOCK_SIZE</code> options are shown. Prior to
          MySQL 8.0, <code class="literal">CREATE_OPTIONS</code> shows the
          originally supplied <code class="literal">ROW_FORMAT</code> and
          <code class="literal">KEY_BLOCK_SIZE</code>. For more information, see
          <a class="xref" href="sql-syntax.html#create-table" title="13.1.20 CREATE TABLE Syntax">Section 13.1.20, “CREATE TABLE Syntax”</a>.
        </p><p>
          <code class="literal">CREATE_OPTIONS</code> shows
          <code class="literal">partitioned</code> for a partitioned table. Prior
          to MySQL 8.0.16, it also shows the
          <code class="literal">ENCRYPTION</code> clause specified for tables
          created in file-per-table tablespaces. As of MySQL 8.0.16, it
          only shows the encryption clause for file-per-table
          tablespaces if the table is encrypted or if the specified
          encryption differs from the schema encryption. The encryption
          clause is not shown for tables created in general tablespaces.
          To identify encrypted file-per-table and general tablespaces,
          query the <a class="link" href="information-schema.html#innodb-tablespaces-table" title="25.39.25 The INFORMATION_SCHEMA INNODB_TABLESPACES Table"><code class="literal">INNODB_TABLESPACES</code></a>
          <code class="literal">ENCRYPTION</code> column.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_COMMENT</code>
        </p><p>
          The comment used when creating the table (or information as to
          why MySQL could not access the table information).
</p></li></ul>
</div>
<h3><a name="idm140091568791040"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          For <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> tables, the output of
          this statement shows appropriate values for the
          <code class="literal">AVG_ROW_LENGTH</code> and
          <code class="literal">DATA_LENGTH</code> columns, with the exception
          that <a class="link" href="data-types.html#blob" title="11.4.3 The BLOB and TEXT Types"><code class="literal">BLOB</code></a> columns are not taken
          into account.
        </p></li><li class="listitem"><p>
          For <a class="link" href="mysql-cluster.html" title="Chapter 22 MySQL NDB Cluster 8.0"><code class="literal">NDB</code></a> tables,
          <code class="literal">DATA_LENGTH</code> includes data stored in main
          memory only; the <code class="literal">MAX_DATA_LENGTH</code> and
          <code class="literal">DATA_FREE</code> columns apply to Disk Data.
        </p></li><li class="listitem"><p>
          For NDB Cluster Disk Data tables,
          <code class="literal">MAX_DATA_LENGTH</code> shows the space allocated
          for the disk part of a Disk Data table or fragment. (In-memory
          data resource usage is reported by the
          <code class="literal">DATA_LENGTH</code> column.)
        </p></li><li class="listitem"><p>
          For <code class="literal">MEMORY</code> tables, the
          <code class="literal">DATA_LENGTH</code>,
          <code class="literal">MAX_DATA_LENGTH</code>, and
          <code class="literal">INDEX_LENGTH</code> values approximate the actual
          amount of allocated memory. The allocation algorithm reserves
          memory in large amounts to reduce the number of allocation
          operations.
        </p></li><li class="listitem"><p>
          For views, most <a class="link" href="information-schema.html#tables-table" title="25.30 The INFORMATION_SCHEMA TABLES Table"><code class="literal">TABLES</code></a> columns
          are 0 or <code class="literal">NULL</code> except that
          <code class="literal">TABLE_NAME</code> indicates the view name,
          <code class="literal">CREATE_TIME</code> indicates the creation time,
          and <code class="literal">TABLE_COMMENT</code> says
          <code class="literal">VIEW</code>.
</p></li></ul>
</div>
<p>
      Table information is also available from the
      <a class="link" href="sql-syntax.html#show-table-status" title="13.7.6.36 SHOW TABLE STATUS Syntax"><code class="literal">SHOW TABLE STATUS</code></a> and
      <a class="link" href="sql-syntax.html#show-tables" title="13.7.6.37 SHOW TABLES Syntax"><code class="literal">SHOW TABLES</code></a> statements. See
      <a class="xref" href="sql-syntax.html#show-table-status" title="13.7.6.36 SHOW TABLE STATUS Syntax">Section 13.7.6.36, “SHOW TABLE STATUS Syntax”</a>, and
      <a class="xref" href="sql-syntax.html#show-tables" title="13.7.6.37 SHOW TABLES Syntax">Section 13.7.6.37, “SHOW TABLES Syntax”</a>. The following statements are
      equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT
    TABLE_NAME, ENGINE, VERSION, ROW_FORMAT, TABLE_ROWS, AVG_ROW_LENGTH,
    DATA_LENGTH, MAX_DATA_LENGTH, INDEX_LENGTH, DATA_FREE, AUTO_INCREMENT,
    CREATE_TIME, UPDATE_TIME, CHECK_TIME, TABLE_COLLATION, CHECKSUM,
    CREATE_OPTIONS, TABLE_COMMENT
  FROM INFORMATION_SCHEMA.TABLES
  WHERE table_schema = '<em class="replaceable"><code>db_name</code></em>'
  [AND table_name LIKE '<em class="replaceable"><code>wild</code></em>']

SHOW TABLE STATUS
  FROM <em class="replaceable"><code>db_name</code></em>
  [LIKE '<em class="replaceable"><code>wild</code></em>']
</pre><p>
      The following statements are equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT
  TABLE_NAME, TABLE_TYPE
  FROM INFORMATION_SCHEMA.TABLES
  WHERE table_schema = '<em class="replaceable"><code>db_name</code></em>'
  [AND table_name LIKE '<em class="replaceable"><code>wild</code></em>']

SHOW FULL TABLES
  FROM <em class="replaceable"><code>db_name</code></em>
  [LIKE '<em class="replaceable"><code>wild</code></em>']
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="tablespaces-table"></a>25.31 The INFORMATION_SCHEMA TABLESPACES Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091568757120"></a><p>
      The <a class="link" href="information-schema.html#tablespaces-table" title="25.31 The INFORMATION_SCHEMA TABLESPACES Table"><code class="literal">TABLESPACES</code></a> table provides
      information about active MySQL Cluster tablespaces.
    </p><p>
      The <a class="link" href="information-schema.html#tablespaces-table" title="25.31 The INFORMATION_SCHEMA TABLESPACES Table"><code class="literal">TABLESPACES</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TABLESPACE_NAME</code>
        </p><p>
          The name of the tablespace.
        </p></li><li class="listitem"><p>
          <code class="literal">ENGINE</code>
        </p><p>
          The name of the storage engine that uses the tablespace.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLESPACE_TYPE</code>
        </p><p>
          The tablespace type.
        </p></li><li class="listitem"><p>
          <code class="literal">LOGFILE_GROUP_NAME</code>
        </p><p>
          The name of the logfile group assigned to the tablespace.
        </p></li><li class="listitem"><p>
          <code class="literal">EXTENT_SIZE</code>
        </p><p>
          The size in bytes of the extents used by files that belong to
          the tablespace.
        </p></li><li class="listitem"><p>
          <code class="literal">AUTOEXTEND_SIZE</code>
        </p><p>
          Unused.
        </p></li><li class="listitem"><p>
          <code class="literal">MAXIMUM_SIZE</code>
        </p><p>
          Unused.
        </p></li><li class="listitem"><p>
          <code class="literal">NODEGROUP_ID</code>
        </p><p>
          Unused.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLESPACE_COMMENT</code>
        </p><p>
          Unused.
</p></li></ul>
</div>
<h3><a name="idm140091568734560"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The <a class="link" href="information-schema.html#tablespaces-table" title="25.31 The INFORMATION_SCHEMA TABLESPACES Table"><code class="literal">TABLESPACES</code></a> table is a
          nonstandard <code class="literal">INFORMATION_SCHEMA</code> table.
        </p></li><li class="listitem"><p>
          The <code class="literal">TABLESPACES</code> table does not provide
          information about <code class="literal">InnoDB</code> tablespaces. For
          <code class="literal">InnoDB</code> tablespace metadata, see the
          <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#innodb-tablespaces-table" title="25.39.25 The INFORMATION_SCHEMA INNODB_TABLESPACES Table"><code class="literal">INNODB_TABLESPACES</code></a> and
          <a class="link" href="information-schema.html#innodb-datafiles-table" title="25.39.9 The INFORMATION_SCHEMA INNODB_DATAFILES Table"><code class="literal">INNODB_DATAFILES</code></a> tables. The
          <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> table also provides
          metadata for <code class="literal">InnoDB</code> tablespaces.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="table-constraints-table"></a>25.32 The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091568721216"></a><p>
      The <a class="link" href="information-schema.html#table-constraints-table" title="25.32 The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table"><code class="literal">TABLE_CONSTRAINTS</code></a> table describes
      which tables have constraints.
    </p><p>
      The <a class="link" href="information-schema.html#table-constraints-table" title="25.32 The INFORMATION_SCHEMA TABLE_CONSTRAINTS Table"><code class="literal">TABLE_CONSTRAINTS</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">CONSTRAINT_CATALOG</code>
        </p><p>
          The name of the catalog to which the constraint belongs. This
          value is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">CONSTRAINT_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the constraint
          belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the table belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the table.
        </p></li><li class="listitem"><p>
          The <code class="literal">CONSTRAINT_TYPE</code>
        </p><p>
          The type of constraint. The value can be
          <code class="literal">UNIQUE</code>, <code class="literal">PRIMARY KEY</code>,
          <code class="literal">FOREIGN KEY</code>, or (as of MySQL 8.0.16)
          <code class="literal">CHECK</code>. This is a
          <a class="link" href="data-types.html#char" title="11.4.1 The CHAR and VARCHAR Types"><code class="literal">CHAR</code></a> (not
          <a class="link" href="data-types.html#enum" title="11.4.4 The ENUM Type"><code class="literal">ENUM</code></a>) column.
        </p><p>
          The <code class="literal">UNIQUE</code> and <code class="literal">PRIMARY
          KEY</code> information is about the same as what you get
          from the <code class="literal">Key_name</code> column in the output from
          <a class="link" href="sql-syntax.html#show-index" title="13.7.6.22 SHOW INDEX Syntax"><code class="literal">SHOW INDEX</code></a> when the
          <code class="literal">Non_unique</code> column is <code class="literal">0</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">ENFORCED</code>
        </p><p>
          For <code class="literal">CHECK</code> constraints, the value is
          <code class="literal">YES</code> or <code class="literal">NO</code> to indicate
          whether the constraint is enforced. For other constraints, the
          value is always <code class="literal">YES</code>.
        </p><p>
          This column was added in MySQL 8.0.16.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="table-privileges-table"></a>25.33 The INFORMATION_SCHEMA TABLE_PRIVILEGES Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091568688496"></a><p>
      The <a class="link" href="information-schema.html#table-privileges-table" title="25.33 The INFORMATION_SCHEMA TABLE_PRIVILEGES Table"><code class="literal">TABLE_PRIVILEGES</code></a> table provides
      information about table privileges. It takes its values from the
      <code class="literal">mysql.tables_priv</code> system table.
    </p><p>
      The <a class="link" href="information-schema.html#table-privileges-table" title="25.33 The INFORMATION_SCHEMA TABLE_PRIVILEGES Table"><code class="literal">TABLE_PRIVILEGES</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">GRANTEE</code>
        </p><p>
          The name of the account to which the privilege is granted, in
          <code class="literal">'<em class="replaceable"><code>user_name</code></em>'@'<em class="replaceable"><code>host_name</code></em>'</code>
          format.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_CATALOG</code>
        </p><p>
          The name of the catalog to which the table belongs. This value
          is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the table belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the table.
        </p></li><li class="listitem"><p>
          <code class="literal">PRIVILEGE_TYPE</code>
        </p><p>
          The privilege granted. The value can be any privilege that can
          be granted at the table level; see <a class="xref" href="sql-syntax.html#grant" title="13.7.1.6 GRANT Syntax">Section 13.7.1.6, “GRANT Syntax”</a>.
          Each row lists a single privilege, so there is one row per
          table privilege held by the grantee.
        </p></li><li class="listitem"><p>
          <code class="literal">IS_GRANTABLE</code>
        </p><p>
          <code class="literal">YES</code> if the user has the
          <a class="link" href="security.html#priv_grant-option"><code class="literal">GRANT OPTION</code></a> privilege,
          <code class="literal">NO</code> otherwise. The output does not list
          <a class="link" href="security.html#priv_grant-option"><code class="literal">GRANT OPTION</code></a> as a separate row
          with <code class="literal">PRIVILEGE_TYPE='GRANT OPTION'</code>.
</p></li></ul>
</div>
<h3><a name="idm140091568663216"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The <a class="link" href="information-schema.html#table-privileges-table" title="25.33 The INFORMATION_SCHEMA TABLE_PRIVILEGES Table"><code class="literal">TABLE_PRIVILEGES</code></a> table is a
          nonstandard <code class="literal">INFORMATION_SCHEMA</code> table.
</p></li></ul>
</div>
<p>
      The following statements are <span class="emphasis"><em>not</em></span> equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT ... FROM INFORMATION_SCHEMA.TABLE_PRIVILEGES

SHOW GRANTS ...
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="triggers-table"></a>25.34 The INFORMATION_SCHEMA TRIGGERS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091568656336"></a><p>
      The <a class="link" href="information-schema.html#triggers-table" title="25.34 The INFORMATION_SCHEMA TRIGGERS Table"><code class="literal">TRIGGERS</code></a> table provides
      information about triggers. To see information about a table's
      triggers, you must have the <a class="link" href="security.html#priv_trigger"><code class="literal">TRIGGER</code></a>
      privilege for the table.
    </p><p>
      The <a class="link" href="information-schema.html#triggers-table" title="25.34 The INFORMATION_SCHEMA TRIGGERS Table"><code class="literal">TRIGGERS</code></a> table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TRIGGER_CATALOG</code>
        </p><p>
          The name of the catalog to which the trigger belongs. This
          value is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TRIGGER_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the trigger
          belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">TRIGGER_NAME</code>
        </p><p>
          The name of the trigger.
        </p></li><li class="listitem"><p>
          <code class="literal">EVENT_MANIPULATION</code>
        </p><p>
          The trigger event. This is the type of operation on the
          associated table for which the trigger activates. The value is
          <code class="literal">INSERT</code> (a row was inserted),
          <code class="literal">DELETE</code> (a row was deleted), or
          <code class="literal">UPDATE</code> (a row was modified).
        </p></li><li class="listitem"><p>
          <code class="literal">EVENT_OBJECT_CATALOG</code>,
          <code class="literal">EVENT_OBJECT_SCHEMA</code>, and
          <code class="literal">EVENT_OBJECT_TABLE</code>
        </p><p>
          As noted in <a class="xref" href="stored-objects.html#triggers" title="24.3 Using Triggers">Section 24.3, “Using Triggers”</a>, every trigger is
          associated with exactly one table. These columns indicate the
          catalog and schema (database) in which this table occurs, and
          the table name, respectively. The
          <code class="literal">EVENT_OBJECT_CATALOG</code> value is always
          <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">ACTION_ORDER</code>
        </p><p>
          The ordinal position of the trigger's action within the list
          of triggers on the same table with the same
          <code class="literal">EVENT_MANIPULATION</code> and
          <code class="literal">ACTION_TIMING</code> values.
        </p></li><li class="listitem"><p>
          <code class="literal">ACTION_CONDITION</code>
        </p><p>
          This value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">ACTION_STATEMENT</code>
        </p><p>
          The trigger body; that is, the statement executed when the
          trigger activates. This text uses UTF-8 encoding.
        </p></li><li class="listitem"><p>
          <code class="literal">ACTION_ORIENTATION</code>
        </p><p>
          This value is always <code class="literal">ROW</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">ACTION_TIMING</code>
        </p><p>
          Whether the trigger activates before or after the triggering
          event. The value is <code class="literal">BEFORE</code> or
          <code class="literal">AFTER</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">ACTION_REFERENCE_OLD_TABLE</code>
        </p><p>
          This value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">ACTION_REFERENCE_NEW_TABLE</code>
        </p><p>
          This value is always <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">ACTION_REFERENCE_OLD_ROW</code> and
          <code class="literal">ACTION_REFERENCE_NEW_ROW</code>
        </p><p>
          The old and new column identifiers, respectively. The
          <code class="literal">ACTION_REFERENCE_OLD_ROW</code> value is always
          <code class="literal">OLD</code> and the
          <code class="literal">ACTION_REFERENCE_NEW_ROW</code> value is always
          <code class="literal">NEW</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">CREATED</code>
        </p><p>
          The date and time when the trigger was created. This is a
          <code class="literal">TIMESTAMP(2)</code> value (with a fractional part
          in hundredths of seconds) for triggers.
        </p></li><li class="listitem"><p>
          <code class="literal">SQL_MODE</code>
        </p><p>
          The SQL mode in effect when the trigger was created, and under
          which the trigger executes. For the permitted values, see
          <a class="xref" href="server-administration.html#sql-mode" title="5.1.11 Server SQL Modes">Section 5.1.11, “Server SQL Modes”</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">DEFINER</code>
        </p><p>
          The account of the user who created the trigger, in
          <code class="literal">'<em class="replaceable"><code>user_name</code></em>'@'<em class="replaceable"><code>host_name</code></em>'</code>
          format.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_SET_CLIENT</code>
        </p><p>
          The session value of the
          <a class="link" href="server-administration.html#sysvar_character_set_client"><code class="literal">character_set_client</code></a> system
          variable when the trigger was created.
        </p></li><li class="listitem"><p>
          <code class="literal">COLLATION_CONNECTION</code>
        </p><p>
          The session value of the
          <a class="link" href="server-administration.html#sysvar_collation_connection"><code class="literal">collation_connection</code></a> system
          variable when the trigger was created.
        </p></li><li class="listitem"><p>
          <code class="literal">DATABASE_COLLATION</code>
        </p><p>
          The collation of the database with which the trigger is
          associated.
</p></li></ul>
</div>
<h3><a name="idm140091568591344"></a>Example</h3>
<p>
      The following example uses the <code class="literal">ins_sum</code> trigger
      defined in <a class="xref" href="stored-objects.html#triggers" title="24.3 Using Triggers">Section 24.3, “Using Triggers”</a>:
    </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.TRIGGERS</code></strong>
       <strong class="userinput"><code>WHERE TRIGGER_SCHEMA='test' AND TRIGGER_NAME='ins_sum'\G</code></strong>
*************************** 1. row ***************************
           TRIGGER_CATALOG: def
            TRIGGER_SCHEMA: test
              TRIGGER_NAME: ins_sum
        EVENT_MANIPULATION: INSERT
      EVENT_OBJECT_CATALOG: def
       EVENT_OBJECT_SCHEMA: test
        EVENT_OBJECT_TABLE: account
              ACTION_ORDER: 1
          ACTION_CONDITION: NULL
          ACTION_STATEMENT: SET @sum = @sum + NEW.amount
        ACTION_ORIENTATION: ROW
             ACTION_TIMING: BEFORE
ACTION_REFERENCE_OLD_TABLE: NULL
ACTION_REFERENCE_NEW_TABLE: NULL
  ACTION_REFERENCE_OLD_ROW: OLD
  ACTION_REFERENCE_NEW_ROW: NEW
                   CREATED: 2018-08-08 10:10:12.61
                  SQL_MODE: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,
                            NO_ZERO_IN_DATE,NO_ZERO_DATE,
                            ERROR_FOR_DIVISION_BY_ZERO,
                            NO_ENGINE_SUBSTITUTION
                   DEFINER: me@localhost
      CHARACTER_SET_CLIENT: utf8mb4
      COLLATION_CONNECTION: utf8mb4_0900_ai_ci
        DATABASE_COLLATION: utf8mb4_0900_ai_ci
</pre><p>
      Trigger information is also available from the
      <a class="link" href="sql-syntax.html#show-triggers" title="13.7.6.38 SHOW TRIGGERS Syntax"><code class="literal">SHOW TRIGGERS</code></a> statement. See
      <a class="xref" href="sql-syntax.html#show-triggers" title="13.7.6.38 SHOW TRIGGERS Syntax">Section 13.7.6.38, “SHOW TRIGGERS Syntax”</a>.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="user-privileges-table"></a>25.35 The INFORMATION_SCHEMA USER_PRIVILEGES Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091568580720"></a><p>
      The <a class="link" href="information-schema.html#user-privileges-table" title="25.35 The INFORMATION_SCHEMA USER_PRIVILEGES Table"><code class="literal">USER_PRIVILEGES</code></a> table provides
      information about global privileges. It takes its values from the
      <code class="literal">mysql.user</code> system table.
    </p><p>
      The <a class="link" href="information-schema.html#user-privileges-table" title="25.35 The INFORMATION_SCHEMA USER_PRIVILEGES Table"><code class="literal">USER_PRIVILEGES</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">GRANTEE</code>
        </p><p>
          The name of the account to which the privilege is granted, in
          <code class="literal">'<em class="replaceable"><code>user_name</code></em>'@'<em class="replaceable"><code>host_name</code></em>'</code>
          format.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_CATALOG</code>
        </p><p>
          The name of the catalog. This value is always
          <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">PRIVILEGE_TYPE</code>
        </p><p>
          The privilege granted. The value can be any privilege that can
          be granted at the global level; see <a class="xref" href="sql-syntax.html#grant" title="13.7.1.6 GRANT Syntax">Section 13.7.1.6, “GRANT Syntax”</a>.
          Each row lists a single privilege, so there is one row per
          global privilege held by the grantee.
        </p></li><li class="listitem"><p>
          <code class="literal">IS_GRANTABLE</code>
        </p><p>
          <code class="literal">YES</code> if the user has the
          <a class="link" href="security.html#priv_grant-option"><code class="literal">GRANT OPTION</code></a> privilege,
          <code class="literal">NO</code> otherwise. The output does not list
          <a class="link" href="security.html#priv_grant-option"><code class="literal">GRANT OPTION</code></a> as a separate row
          with <code class="literal">PRIVILEGE_TYPE='GRANT OPTION'</code>.
</p></li></ul>
</div>
<h3><a name="idm140091568559424"></a>Notes</h3>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The <a class="link" href="information-schema.html#user-privileges-table" title="25.35 The INFORMATION_SCHEMA USER_PRIVILEGES Table"><code class="literal">USER_PRIVILEGES</code></a> table is a
          nonstandard <code class="literal">INFORMATION_SCHEMA</code> table.
</p></li></ul>
</div>
<p>
      The following statements are <span class="emphasis"><em>not</em></span> equivalent:
    </p><pre data-lang="sql" class="programlisting">
SELECT ... FROM INFORMATION_SCHEMA.USER_PRIVILEGES

SHOW GRANTS ...
</pre>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="views-table"></a>25.36 The INFORMATION_SCHEMA VIEWS Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091568552544"></a><p>
      The <a class="link" href="information-schema.html#views-table" title="25.36 The INFORMATION_SCHEMA VIEWS Table"><code class="literal">VIEWS</code></a> table provides information
      about views in databases. You must have the
      <a class="link" href="security.html#priv_show-view"><code class="literal">SHOW VIEW</code></a> privilege to access this
      table.
    </p><p>
      The <a class="link" href="information-schema.html#views-table" title="25.36 The INFORMATION_SCHEMA VIEWS Table"><code class="literal">VIEWS</code></a> table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TABLE_CATALOG</code>
        </p><p>
          The name of the catalog to which the view belongs. This value
          is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the view belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the view.
        </p></li><li class="listitem"><p>
          <code class="literal">VIEW_DEFINITION</code>
        </p><p>
          The <a class="link" href="sql-syntax.html#select" title="13.2.10 SELECT Syntax"><code class="literal">SELECT</code></a> statement that
          provides the definition of the view. This column has most of
          what you see in the <code class="literal">Create Table</code> column
          that <a class="link" href="sql-syntax.html#show-create-view" title="13.7.6.13 SHOW CREATE VIEW Syntax"><code class="literal">SHOW CREATE VIEW</code></a> produces.
          Skip the words before <a class="link" href="sql-syntax.html#select" title="13.2.10 SELECT Syntax"><code class="literal">SELECT</code></a>
          and skip the words <code class="literal">WITH CHECK OPTION</code>.
          Suppose that the original statement was:
        </p><pre data-lang="sql" class="programlisting">
CREATE VIEW v AS
  SELECT s2,s1 FROM t
  WHERE s1 &gt; 5
  ORDER BY s1
  WITH CHECK OPTION;
</pre><p>
          Then the view definition looks like this:
        </p><pre data-lang="sql" class="programlisting">
SELECT s2,s1 FROM t WHERE s1 &gt; 5 ORDER BY s1
</pre></li><li class="listitem"><p>
          <code class="literal">CHECK_OPTION</code>
        </p><p>
          The value of the <code class="literal">CHECK_OPTION</code> attribute.
          The value is one of <code class="literal">NONE</code>,
          <code class="literal">CASCADE</code>, or <code class="literal">LOCAL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">IS_UPDATABLE</code>
        </p><p>
          MySQL sets a flag, called the view updatability flag, at
          <a class="link" href="sql-syntax.html#create-view" title="13.1.23 CREATE VIEW Syntax"><code class="literal">CREATE VIEW</code></a> time. The flag is
          set to <code class="literal">YES</code> (true) if
          <a class="link" href="sql-syntax.html#update" title="13.2.12 UPDATE Syntax"><code class="literal">UPDATE</code></a> and
          <a class="link" href="sql-syntax.html#delete" title="13.2.2 DELETE Syntax"><code class="literal">DELETE</code></a> (and similar operations)
          are legal for the view. Otherwise, the flag is set to
          <code class="literal">NO</code> (false). The
          <code class="literal">IS_UPDATABLE</code> column in the
          <a class="link" href="information-schema.html#views-table" title="25.36 The INFORMATION_SCHEMA VIEWS Table"><code class="literal">VIEWS</code></a> table displays the status
          of this flag. It means that the server always knows whether a
          view is updatable.
        </p><p>
          If a view is not updatable, statements such
          <a class="link" href="sql-syntax.html#update" title="13.2.12 UPDATE Syntax"><code class="literal">UPDATE</code></a>,
          <a class="link" href="sql-syntax.html#delete" title="13.2.2 DELETE Syntax"><code class="literal">DELETE</code></a>, and
          <a class="link" href="sql-syntax.html#insert" title="13.2.6 INSERT Syntax"><code class="literal">INSERT</code></a> are illegal and are
          rejected. (Even if a view is updatable, it might not be
          possible to insert into it; for details, refer to
          <a class="xref" href="stored-objects.html#view-updatability" title="24.5.3 Updatable and Insertable Views">Section 24.5.3, “Updatable and Insertable Views”</a>.)
        </p></li><li class="listitem"><p>
          <code class="literal">DEFINER</code>
        </p><p>
          The account of the user who created the view, in
          <code class="literal">'<em class="replaceable"><code>user_name</code></em>'@'<em class="replaceable"><code>host_name</code></em>'</code>
          format.
        </p></li><li class="listitem"><p>
          <code class="literal">SECURITY_TYPE</code>
        </p><p>
          The view <code class="literal">SQL SECURITY</code> characteristic. The
          value is one of <code class="literal">DEFINER</code> or
          <code class="literal">INVOKER</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">CHARACTER_SET_CLIENT</code>
        </p><p>
          The session value of the
          <a class="link" href="server-administration.html#sysvar_character_set_client"><code class="literal">character_set_client</code></a> system
          variable when the view was created.
        </p></li><li class="listitem"><p>
          <code class="literal">COLLATION_CONNECTION</code>
        </p><p>
          The session value of the
          <a class="link" href="server-administration.html#sysvar_collation_connection"><code class="literal">collation_connection</code></a> system
          variable when the view was created.
</p></li></ul>
</div>
<h3><a name="idm140091568496912"></a>Notes</h3>
<p>
      MySQL permits different <a class="link" href="server-administration.html#sysvar_sql_mode"><code class="literal">sql_mode</code></a>
      settings to tell the server the type of SQL syntax to support. For
      example, you might use the <a class="link" href="server-administration.html#sqlmode_ansi"><code class="literal">ANSI</code></a>
      SQL mode to ensure MySQL correctly interprets the standard SQL
      concatenation operator, the double bar (<code class="literal">||</code>), in
      your queries. If you then create a view that concatenates items,
      you might worry that changing the
      <a class="link" href="server-administration.html#sysvar_sql_mode"><code class="literal">sql_mode</code></a> setting to a value
      different from <a class="link" href="server-administration.html#sqlmode_ansi"><code class="literal">ANSI</code></a> could cause
      the view to become invalid. But this is not the case. No matter
      how you write out a view definition, MySQL always stores it the
      same way, in a canonical form. Here is an example that shows how
      the server changes a double bar concatenation operator to a
      <a class="link" href="functions.html#function_concat"><code class="literal">CONCAT()</code></a> function:
    </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SET sql_mode = 'ANSI';</code></strong>
Query OK, 0 rows affected (0.00 sec)

mysql&gt; <strong class="userinput"><code>CREATE VIEW test.v AS SELECT 'a' || 'b' as col1;</code></strong>
Query OK, 0 rows affected (0.00 sec)

mysql&gt; <strong class="userinput"><code>SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS</code></strong>
       <strong class="userinput"><code>WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME = 'v';</code></strong>
+----------------------------------+
| VIEW_DEFINITION                  |
+----------------------------------+
| select concat('a','b') AS `col1` |
+----------------------------------+
1 row in set (0.00 sec)
</pre><p>
      The advantage of storing a view definition in canonical form is
      that changes made later to the value of
      <a class="link" href="server-administration.html#sysvar_sql_mode"><code class="literal">sql_mode</code></a> do not affect the
      results from the view. However, an additional consequence is that
      comments prior to <a class="link" href="sql-syntax.html#select" title="13.2.10 SELECT Syntax"><code class="literal">SELECT</code></a> are
      stripped from the definition by the server.
</p>
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="view-routine-usage-table"></a>25.37 The INFORMATION_SCHEMA VIEW_ROUTINE_USAGE Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091568479728"></a><p>
      The <a class="link" href="information-schema.html#view-routine-usage-table" title="25.37 The INFORMATION_SCHEMA VIEW_ROUTINE_USAGE Table"><code class="literal">VIEW_ROUTINE_USAGE</code></a> table
      (available as of MySQL 8.0.13) provides access to information
      about stored functions used in view definitions. The table does
      not list information about built-in SQL functions or user-defined
      functions (UDFs) used in the definitions.
    </p><p>
      You can see information only for views for which you have some
      privilege, and only for functions for which you have some
      privilege.
    </p><p>
      The <a class="link" href="information-schema.html#view-routine-usage-table" title="25.37 The INFORMATION_SCHEMA VIEW_ROUTINE_USAGE Table"><code class="literal">VIEW_ROUTINE_USAGE</code></a> table has
      these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TABLE_CATALOG</code>
        </p><p>
          The name of the catalog to which the view belongs. This value
          is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the view belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the view.
        </p></li><li class="listitem"><p>
          <code class="literal">SPECIFIC_CATALOG</code>
        </p><p>
          The name of the catalog to which the function used in the view
          definition belongs. This value is always
          <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">SPECIFIC_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the function used
          in the view definition belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">SPECIFIC_NAME</code>
        </p><p>
          The name of the function used in the view definition.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="view-table-usage-table"></a>25.38 The INFORMATION_SCHEMA VIEW_TABLE_USAGE Table</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091568459328"></a><p>
      The <a class="link" href="information-schema.html#view-table-usage-table" title="25.38 The INFORMATION_SCHEMA VIEW_TABLE_USAGE Table"><code class="literal">VIEW_TABLE_USAGE</code></a> table (available
      as of MySQL 8.0.13) provides access to information about tables
      and views used in view definitions.
    </p><p>
      You can see information only for views for which you have some
      privilege, and only for tables for which you have some privilege.
    </p><p>
      The <a class="link" href="information-schema.html#view-table-usage-table" title="25.38 The INFORMATION_SCHEMA VIEW_TABLE_USAGE Table"><code class="literal">VIEW_TABLE_USAGE</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">VIEW_CATALOG</code>
        </p><p>
          The name of the catalog to which the view belongs. This value
          is always <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">VIEW_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the view belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">VIEW_NAME</code>
        </p><p>
          The name of the view.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_CATALOG</code>
        </p><p>
          The name of the catalog to which the table or view used in the
          view definition belongs. This value is always
          <code class="literal">def</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_SCHEMA</code>
        </p><p>
          The name of the schema (database) to which the table or view
          used in the view definition belongs.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the table or view used in the view definition.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="innodb-i_s-tables"></a>25.39 INFORMATION_SCHEMA InnoDB Tables</h2>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="information-schema.html#innodb-buffer-page-table">25.39.1 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-buffer-page-lru-table">25.39.2 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE_LRU Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-buffer-pool-stats-table">25.39.3 The INFORMATION_SCHEMA INNODB_BUFFER_POOL_STATS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-cached-indexes-table">25.39.4 The INFORMATION_SCHEMA INNODB_CACHED_INDEXES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-cmp-table">25.39.5 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-cmpmem-table">25.39.6 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-cmp-per-index-table">25.39.7 The INFORMATION_SCHEMA INNODB_CMP_PER_INDEX and
INNODB_CMP_PER_INDEX_RESET Tables</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-columns-table">25.39.8 The INFORMATION_SCHEMA INNODB_COLUMNS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-datafiles-table">25.39.9 The INFORMATION_SCHEMA INNODB_DATAFILES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-fields-table">25.39.10 The INFORMATION_SCHEMA INNODB_FIELDS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-foreign-table">25.39.11 The INFORMATION_SCHEMA INNODB_FOREIGN Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-foreign-cols-table">25.39.12 The INFORMATION_SCHEMA INNODB_FOREIGN_COLS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-ft-being-deleted-table">25.39.13 The INFORMATION_SCHEMA INNODB_FT_BEING_DELETED Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-ft-config-table">25.39.14 The INFORMATION_SCHEMA INNODB_FT_CONFIG Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-ft-default-stopword-table">25.39.15 The INFORMATION_SCHEMA INNODB_FT_DEFAULT_STOPWORD Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-ft-deleted-table">25.39.16 The INFORMATION_SCHEMA INNODB_FT_DELETED Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-ft-index-cache-table">25.39.17 The INFORMATION_SCHEMA INNODB_FT_INDEX_CACHE Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-ft-index-table-table">25.39.18 The INFORMATION_SCHEMA INNODB_FT_INDEX_TABLE Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-indexes-table">25.39.19 The INFORMATION_SCHEMA INNODB_INDEXES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-locks-table">25.39.20 The INFORMATION_SCHEMA INNODB_LOCKS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-lock-waits-table">25.39.21 The INFORMATION_SCHEMA INNODB_LOCK_WAITS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-metrics-table">25.39.22 The INFORMATION_SCHEMA INNODB_METRICS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-session-temp-tablespaces-table">25.39.23 The INFORMATION_SCHEMA INNODB_SESSION_TEMP_TABLESPACES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-tables-table">25.39.24 The INFORMATION_SCHEMA INNODB_TABLES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-tablespaces-table">25.39.25 The INFORMATION_SCHEMA INNODB_TABLESPACES Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-tablespaces-brief-table">25.39.26 The INFORMATION_SCHEMA INNODB_TABLESPACES_BRIEF Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-tablestats-table">25.39.27 The INFORMATION_SCHEMA INNODB_TABLESTATS View</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-temp-table-info-table">25.39.28 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-trx-table">25.39.29 The INFORMATION_SCHEMA INNODB_TRX Table</a></span></dt><dt><span class="section"><a href="information-schema.html#innodb-virtual-table">25.39.30 The INFORMATION_SCHEMA INNODB_VIRTUAL Table</a></span></dt></dl>
</div>
<a class="indexterm" name="idm140091568439200"></a><a class="indexterm" name="idm140091568437744"></a><p>
    This section provides table definitions for
    <code class="literal">InnoDB</code> <code class="literal">INFORMATION_SCHEMA</code>
    tables. For related information and examples, see
    <a class="xref" href="innodb-storage-engine.html#innodb-information-schema" title="15.14 InnoDB INFORMATION_SCHEMA Tables">Section 15.14, “InnoDB INFORMATION_SCHEMA Tables”</a>.
  </p><p>
    <code class="literal">InnoDB</code> <code class="literal">INFORMATION_SCHEMA</code>
    tables can be used to monitor ongoing <code class="literal">InnoDB</code>
    activity, to detect inefficiencies before they turn into issues, or
    to troubleshoot performance and capacity issues. As your database
    becomes bigger and busier, running up against the limits of your
    hardware capacity, you monitor and tune these aspects to keep the
    database running smoothly.
</p>
<div class="section">

<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-buffer-page-table"></a>25.39.1 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE Table</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm140091568429520"></a><p>
      The <a class="link" href="information-schema.html#innodb-buffer-page-table" title="25.39.1 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE Table"><code class="literal">INNODB_BUFFER_PAGE</code></a> table provides
      information about each <a class="link" href="glossary.html#glos_page" title="page">page</a> in
      the <code class="literal">InnoDB</code>
      <a class="link" href="glossary.html#glos_buffer_pool" title="buffer pool">buffer pool</a>.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-buffer-pool-tables" title="15.14.5 InnoDB INFORMATION_SCHEMA Buffer Pool Tables">Section 15.14.5, “InnoDB INFORMATION_SCHEMA Buffer Pool Tables”</a>.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Warning
</div>
<p>
        Querying the <a class="link" href="information-schema.html#innodb-buffer-page-table" title="25.39.1 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE Table"><code class="literal">INNODB_BUFFER_PAGE</code></a>
        table can affect performance. Do not query this table on a
        production system unless you are aware of the performance impact
        and have determined it to be acceptable. To avoid impacting
        performance on a production system, reproduce the issue you want
        to investigate and query buffer pool statistics on a test
        instance.
</p>
</div>
<p>
      The <a class="link" href="information-schema.html#innodb-buffer-page-table" title="25.39.1 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE Table"><code class="literal">INNODB_BUFFER_PAGE</code></a> table has
      these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">POOL_ID</code>
        </p><p>
          The buffer pool ID. This is an identifier to distinguish
          between multiple buffer pool instances.
        </p></li><li class="listitem"><p>
          <code class="literal">BLOCK_ID</code>
        </p><p>
          The buffer pool block ID.
        </p></li><li class="listitem"><p>
          <code class="literal">SPACE</code>
        </p><p>
          The tablespace ID; the same value as
          <code class="literal">INNODB_TABLES.SPACE</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">PAGE_NUMBER</code>
        </p><p>
          The page number.
        </p></li><li class="listitem"><p>
          <code class="literal">PAGE_TYPE</code>
        </p><p>
          The page type. The following table shows the permitted values.
</p>
<div class="table">
<a name="innodb-information-schema-innodb_buffer_page_table-page-type"></a><p class="title"><b>Table 25.1 INNODB_BUFFER_PAGE.PAGE_TYPE Values</b></p>
<div class="table-contents">
<table summary="Mapping for interpreting INNODB_BUFFER_PAGE.PAGE_TYPE values."><col width="30%"><col width="30%"><thead><tr>
              <th scope="col">Page Type</th>
              <th scope="col">Description</th>
            </tr></thead><tbody><tr>
              <td scope="row"><code class="literal">ALLOCATED</code></td>
              <td>Freshly allocated page</td>
            </tr><tr>
              <td scope="row"><code class="literal">BLOB</code></td>
              <td>Uncompressed BLOB page</td>
            </tr><tr>
              <td scope="row"><code class="literal">COMPRESSED_BLOB2</code></td>
              <td>Subsequent comp BLOB page</td>
            </tr><tr>
              <td scope="row"><code class="literal">COMPRESSED_BLOB</code></td>
              <td>First compressed BLOB page</td>
            </tr><tr>
              <td scope="row"><code class="literal">ENCRYPTED_RTREE</code></td>
              <td>Encrypted R-tree</td>
            </tr><tr>
              <td scope="row"><code class="literal">EXTENT_DESCRIPTOR</code></td>
              <td>Extent descriptor page</td>
            </tr><tr>
              <td scope="row"><code class="literal">FILE_SPACE_HEADER</code></td>
              <td>File space header</td>
            </tr><tr>
              <td scope="row"><code class="literal">FIL_PAGE_TYPE_UNUSED</code></td>
              <td>Unused</td>
            </tr><tr>
              <td scope="row"><code class="literal">IBUF_BITMAP</code></td>
              <td>Insert buffer bitmap</td>
            </tr><tr>
              <td scope="row"><code class="literal">IBUF_FREE_LIST</code></td>
              <td>Insert buffer free list</td>
            </tr><tr>
              <td scope="row"><code class="literal">IBUF_INDEX</code></td>
              <td>Insert buffer index</td>
            </tr><tr>
              <td scope="row"><code class="literal">INDEX</code></td>
              <td>B-tree node</td>
            </tr><tr>
              <td scope="row"><code class="literal">INODE</code></td>
              <td>Index node</td>
            </tr><tr>
              <td scope="row"><code class="literal">LOB_DATA</code></td>
              <td>Uncompressed LOB data</td>
            </tr><tr>
              <td scope="row"><code class="literal">LOB_FIRST</code></td>
              <td>First page of uncompressed LOB</td>
            </tr><tr>
              <td scope="row"><code class="literal">LOB_INDEX</code></td>
              <td>Uncompressed LOB index</td>
            </tr><tr>
              <td scope="row"><code class="literal">PAGE_IO_COMPRESSED</code></td>
              <td>Compressed page</td>
            </tr><tr>
              <td scope="row"><code class="literal">PAGE_IO_COMPRESSED_ENCRYPTED</code></td>
              <td>Compressed and encrypted page</td>
            </tr><tr>
              <td scope="row"><code class="literal">PAGE_IO_ENCRYPTED</code></td>
              <td>Encrypted page</td>
            </tr><tr>
              <td scope="row"><code class="literal">RSEG_ARRAY</code></td>
              <td>Rollback segment array</td>
            </tr><tr>
              <td scope="row"><code class="literal">RTREE_INDEX</code></td>
              <td>R-tree index</td>
            </tr><tr>
              <td scope="row"><code class="literal">SDI_BLOB</code></td>
              <td>Uncompressed SDI BLOB</td>
            </tr><tr>
              <td scope="row"><code class="literal">SDI_COMPRESSED_BLOB</code></td>
              <td>Compressed SDI BLOB</td>
            </tr><tr>
              <td scope="row"><code class="literal">SDI_INDEX</code></td>
              <td>SDI index</td>
            </tr><tr>
              <td scope="row"><code class="literal">SYSTEM</code></td>
              <td>System page</td>
            </tr><tr>
              <td scope="row"><code class="literal">TRX_SYSTEM</code></td>
              <td>Transaction system data</td>
            </tr><tr>
              <td scope="row"><code class="literal">UNDO_LOG</code></td>
              <td>Undo log page</td>
            </tr><tr>
              <td scope="row"><code class="literal">UNKNOWN</code></td>
              <td>Unknown</td>
            </tr><tr>
              <td scope="row"><code class="literal">ZLOB_DATA</code></td>
              <td>Compressed LOB data</td>
            </tr><tr>
              <td scope="row"><code class="literal">ZLOB_FIRST</code></td>
              <td>First page of compressed LOB</td>
            </tr><tr>
              <td scope="row"><code class="literal">ZLOB_FRAG</code></td>
              <td>Compressed LOB fragment</td>
            </tr><tr>
              <td scope="row"><code class="literal">ZLOB_FRAG_ENTRY</code></td>
              <td>Compressed LOB fragment index</td>
            </tr><tr>
              <td scope="row"><code class="literal">ZLOB_INDEX</code></td>
              <td>Compressed LOB index</td>
</tr></tbody></table>
</div>

</div>
<br class="table-break"></li><li class="listitem"><p>
          <code class="literal">FLUSH_TYPE</code>
        </p><p>
          The flush type.
        </p></li><li class="listitem"><p>
          <code class="literal">FIX_COUNT</code>
        </p><p>
          The number of threads using this block within the buffer pool.
          When zero, the block is eligible to be evicted.
        </p></li><li class="listitem"><p>
          <code class="literal">IS_HASHED</code>
        </p><p>
          Whether a hash index has been built on this page.
        </p></li><li class="listitem"><p>
          <code class="literal">NEWEST_MODIFICATION</code>
        </p><p>
          The Log Sequence Number of the youngest modification.
        </p></li><li class="listitem"><p>
          <code class="literal">OLDEST_MODIFICATION</code>
        </p><p>
          The Log Sequence Number of the oldest modification.
        </p></li><li class="listitem"><p>
          <code class="literal">ACCESS_TIME</code>
        </p><p>
          An abstract number used to judge the first access time of the
          page.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the table the page belongs to. This column is
          applicable only to pages with a <code class="literal">PAGE_TYPE</code>
          value of <code class="literal">INDEX</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">INDEX_NAME</code>
        </p><p>
          The name of the index the page belongs to. This can be the
          name of a clustered index or a secondary index. This column is
          applicable only to pages with a <code class="literal">PAGE_TYPE</code>
          value of <code class="literal">INDEX</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">NUMBER_RECORDS</code>
        </p><p>
          The number of records within the page.
        </p></li><li class="listitem"><p>
          <code class="literal">DATA_SIZE</code>
        </p><p>
          The sum of the sizes of the records. This column is applicable
          only to pages with a <code class="literal">PAGE_TYPE</code> value of
          <code class="literal">INDEX</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">COMPRESSED_SIZE</code>
        </p><p>
          The compressed page size. <code class="literal">NULL</code> for pages
          that are not compressed.
        </p></li><li class="listitem"><p>
          <code class="literal">PAGE_STATE</code>
        </p><p>
          The page state. The following table shows the permitted
          values.
</p>
<div class="table">
<a name="innodb-information-schema-innodb_buffer_page_table-page-state"></a><p class="title"><b>Table 25.2 INNODB_BUFFER_PAGE.PAGE_STATE Values</b></p>
<div class="table-contents">
<table summary="Mapping for interpreting INNODB_BUFFER_PAGE.PAGE_STATE values."><col width="25%"><col width="75%"><thead><tr>
              <th scope="col">Page State</th>
              <th scope="col">Description</th>
            </tr></thead><tbody><tr>
              <td scope="row"><code class="literal">FILE_PAGE</code></td>
              <td>A buffered file page</td>
            </tr><tr>
              <td scope="row"><code class="literal">MEMORY</code></td>
              <td>Contains a main memory object</td>
            </tr><tr>
              <td scope="row"><code class="literal">NOT_USED</code></td>
              <td>In the free list</td>
            </tr><tr>
              <td scope="row"><code class="literal">NULL</code></td>
              <td>Clean compressed pages, compressed pages in the flush list, pages used
                as buffer pool watch sentinels</td>
            </tr><tr>
              <td scope="row"><code class="literal">READY_FOR_USE</code></td>
              <td>A free page</td>
            </tr><tr>
              <td scope="row"><code class="literal">REMOVE_HASH</code></td>
              <td>Hash index should be removed before placing in the free list</td>
</tr></tbody></table>
</div>

</div>
<br class="table-break"></li><li class="listitem"><p>
          <code class="literal">IO_FIX</code>
        </p><p>
          Whether any I/O is pending for this page:
          <code class="literal">IO_NONE</code> = no pending I/O,
          <code class="literal">IO_READ</code> = read pending,
          <code class="literal">IO_WRITE</code> = write pending.
        </p></li><li class="listitem"><p>
          <code class="literal">IS_OLD</code>
        </p><p>
          Whether the block is in the sublist of old blocks in the LRU
          list.
        </p></li><li class="listitem"><p>
          <code class="literal">FREE_PAGE_CLOCK</code>
        </p><p>
          The value of the <code class="literal">freed_page_clock</code> counter
          when the block was the last placed at the head of the LRU
          list. The <code class="literal">freed_page_clock</code> counter tracks
          the number of blocks removed from the end of the LRU list.
</p></li></ul>
</div>
<h4><a name="idm140091568246768"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE LIMIT 1\G</code></strong>
*************************** 1. row ***************************
            POOL_ID: 0
           BLOCK_ID: 0
              SPACE: 97
        PAGE_NUMBER: 2473
          PAGE_TYPE: INDEX
         FLUSH_TYPE: 1
          FIX_COUNT: 0
          IS_HASHED: YES
NEWEST_MODIFICATION: 733855581
OLDEST_MODIFICATION: 0
        ACCESS_TIME: 3378385672
         TABLE_NAME: `employees`.`salaries`
         INDEX_NAME: PRIMARY
     NUMBER_RECORDS: 468
          DATA_SIZE: 14976
    COMPRESSED_SIZE: 0
         PAGE_STATE: FILE_PAGE
             IO_FIX: IO_NONE
             IS_OLD: YES
    FREE_PAGE_CLOCK: 66
</pre>
<h4><a name="idm140091568243792"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          This table is useful primarily for expert-level performance
          monitoring, or when developing performance-related extensions
          for MySQL.
        </p></li><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
        </p></li><li class="listitem"><p>
          When tables, table rows, partitions, or indexes are deleted,
          associated pages remain in the buffer pool until space is
          required for other data. The
          <a class="link" href="information-schema.html#innodb-buffer-page-table" title="25.39.1 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE Table"><code class="literal">INNODB_BUFFER_PAGE</code></a> table reports
          information about these pages until they are evicted from the
          buffer pool. For more information about how the
          <code class="literal">InnoDB</code> manages buffer pool data, see
          <a class="xref" href="innodb-storage-engine.html#innodb-buffer-pool" title="15.5.1 Buffer Pool">Section 15.5.1, “Buffer Pool”</a>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-buffer-page-lru-table"></a>25.39.2 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE_LRU Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091568230432"></a><p>
      The <a class="link" href="information-schema.html#innodb-buffer-page-lru-table" title="25.39.2 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE_LRU Table"><code class="literal">INNODB_BUFFER_PAGE_LRU</code></a> table
      provides information about the pages in the
      <code class="literal">InnoDB</code> <a class="link" href="glossary.html#glos_buffer_pool" title="buffer pool">buffer
      pool</a>; in particular, how they are ordered in the LRU list
      that determines which pages to
      <a class="link" href="glossary.html#glos_eviction" title="eviction">evict</a> from the buffer pool
      when it becomes full.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-buffer-page-lru-table" title="25.39.2 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE_LRU Table"><code class="literal">INNODB_BUFFER_PAGE_LRU</code></a> table has
      the same columns as the
      <a class="link" href="information-schema.html#innodb-buffer-page-table" title="25.39.1 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE Table"><code class="literal">INNODB_BUFFER_PAGE</code></a> table, except that
      the <a class="link" href="information-schema.html#innodb-buffer-page-lru-table" title="25.39.2 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE_LRU Table"><code class="literal">INNODB_BUFFER_PAGE_LRU</code></a> table has
      <code class="literal">LRU_POSITION</code> and <code class="literal">COMPRESSED</code>
      columns instead of <code class="literal">BLOCK_ID</code> and
      <code class="literal">PAGE_STATE</code> columns.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-buffer-pool-tables" title="15.14.5 InnoDB INFORMATION_SCHEMA Buffer Pool Tables">Section 15.14.5, “InnoDB INFORMATION_SCHEMA Buffer Pool Tables”</a>.
</p>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Warning
</div>
<p>
        Querying the <a class="link" href="information-schema.html#innodb-buffer-page-lru-table" title="25.39.2 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE_LRU Table"><code class="literal">INNODB_BUFFER_PAGE_LRU</code></a>
        table can affect performance. Do not query this table on a
        production system unless you are aware of the performance impact
        and have determined it to be acceptable. To avoid impacting
        performance on a production system, reproduce the issue you want
        to investigate and query buffer pool statistics on a test
        instance.
</p>
</div>
<p>
      The <a class="link" href="information-schema.html#innodb-buffer-page-lru-table" title="25.39.2 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE_LRU Table"><code class="literal">INNODB_BUFFER_PAGE_LRU</code></a> table has
      these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">POOL_ID</code>
        </p><p>
          The buffer pool ID. This is an identifier to distinguish
          between multiple buffer pool instances.
        </p></li><li class="listitem"><p>
          <code class="literal">LRU_POSITION</code>
        </p><p>
          The position of the page in the LRU list.
        </p></li><li class="listitem"><p>
          <code class="literal">SPACE</code>
        </p><p>
          The tablespace ID; the same value as
          <code class="literal">INNODB_TABLES.SPACE</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">PAGE_NUMBER</code>
        </p><p>
          The page number.
        </p></li><li class="listitem"><p>
          <code class="literal">PAGE_TYPE</code>
        </p><p>
          The page type. The following table shows the permitted values.
</p>
<div class="table">
<a name="innodb-information-schema-innodb_buffer_page_lru_table-page-type"></a><p class="title"><b>Table 25.3 INNODB_BUFFER_PAGE_LRU.PAGE_TYPE Values</b></p>
<div class="table-contents">
<table summary="Mapping for interpreting INNODB_BUFFER_PAGE_LRU.PAGE_TYPE values."><col width="30%"><col width="30%"><thead><tr>
              <th scope="col">Page Type</th>
              <th scope="col">Description</th>
            </tr></thead><tbody><tr>
              <td scope="row"><code class="literal">ALLOCATED</code></td>
              <td>Freshly allocated page</td>
            </tr><tr>
              <td scope="row"><code class="literal">BLOB</code></td>
              <td>Uncompressed BLOB page</td>
            </tr><tr>
              <td scope="row"><code class="literal">COMPRESSED_BLOB2</code></td>
              <td>Subsequent comp BLOB page</td>
            </tr><tr>
              <td scope="row"><code class="literal">COMPRESSED_BLOB</code></td>
              <td>First compressed BLOB page</td>
            </tr><tr>
              <td scope="row"><code class="literal">ENCRYPTED_RTREE</code></td>
              <td>Encrypted R-tree</td>
            </tr><tr>
              <td scope="row"><code class="literal">EXTENT_DESCRIPTOR</code></td>
              <td>Extent descriptor page</td>
            </tr><tr>
              <td scope="row"><code class="literal">FILE_SPACE_HEADER</code></td>
              <td>File space header</td>
            </tr><tr>
              <td scope="row"><code class="literal">FIL_PAGE_TYPE_UNUSED</code></td>
              <td>Unused</td>
            </tr><tr>
              <td scope="row"><code class="literal">IBUF_BITMAP</code></td>
              <td>Insert buffer bitmap</td>
            </tr><tr>
              <td scope="row"><code class="literal">IBUF_FREE_LIST</code></td>
              <td>Insert buffer free list</td>
            </tr><tr>
              <td scope="row"><code class="literal">IBUF_INDEX</code></td>
              <td>Insert buffer index</td>
            </tr><tr>
              <td scope="row"><code class="literal">INDEX</code></td>
              <td>B-tree node</td>
            </tr><tr>
              <td scope="row"><code class="literal">INODE</code></td>
              <td>Index node</td>
            </tr><tr>
              <td scope="row"><code class="literal">LOB_DATA</code></td>
              <td>Uncompressed LOB data</td>
            </tr><tr>
              <td scope="row"><code class="literal">LOB_FIRST</code></td>
              <td>First page of uncompressed LOB</td>
            </tr><tr>
              <td scope="row"><code class="literal">LOB_INDEX</code></td>
              <td>Uncompressed LOB index</td>
            </tr><tr>
              <td scope="row"><code class="literal">PAGE_IO_COMPRESSED</code></td>
              <td>Compressed page</td>
            </tr><tr>
              <td scope="row"><code class="literal">PAGE_IO_COMPRESSED_ENCRYPTED</code></td>
              <td>Compressed and encrypted page</td>
            </tr><tr>
              <td scope="row"><code class="literal">PAGE_IO_ENCRYPTED</code></td>
              <td>Encrypted page</td>
            </tr><tr>
              <td scope="row"><code class="literal">RSEG_ARRAY</code></td>
              <td>Rollback segment array</td>
            </tr><tr>
              <td scope="row"><code class="literal">RTREE_INDEX</code></td>
              <td>R-tree index</td>
            </tr><tr>
              <td scope="row"><code class="literal">SDI_BLOB</code></td>
              <td>Uncompressed SDI BLOB</td>
            </tr><tr>
              <td scope="row"><code class="literal">SDI_COMPRESSED_BLOB</code></td>
              <td>Compressed SDI BLOB</td>
            </tr><tr>
              <td scope="row"><code class="literal">SDI_INDEX</code></td>
              <td>SDI index</td>
            </tr><tr>
              <td scope="row"><code class="literal">SYSTEM</code></td>
              <td>System page</td>
            </tr><tr>
              <td scope="row"><code class="literal">TRX_SYSTEM</code></td>
              <td>Transaction system data</td>
            </tr><tr>
              <td scope="row"><code class="literal">UNDO_LOG</code></td>
              <td>Undo log page</td>
            </tr><tr>
              <td scope="row"><code class="literal">UNKNOWN</code></td>
              <td>Unknown</td>
            </tr><tr>
              <td scope="row"><code class="literal">ZLOB_DATA</code></td>
              <td>Compressed LOB data</td>
            </tr><tr>
              <td scope="row"><code class="literal">ZLOB_FIRST</code></td>
              <td>First page of compressed LOB</td>
            </tr><tr>
              <td scope="row"><code class="literal">ZLOB_FRAG</code></td>
              <td>Compressed LOB fragment</td>
            </tr><tr>
              <td scope="row"><code class="literal">ZLOB_FRAG_ENTRY</code></td>
              <td>Compressed LOB fragment index</td>
            </tr><tr>
              <td scope="row"><code class="literal">ZLOB_INDEX</code></td>
              <td>Compressed LOB index</td>
</tr></tbody></table>
</div>

</div>
<br class="table-break"></li><li class="listitem"><p>
          <code class="literal">FLUSH_TYPE</code>
        </p><p>
          The flush type.
        </p></li><li class="listitem"><p>
          <code class="literal">FIX_COUNT</code>
        </p><p>
          The number of threads using this block within the buffer pool.
          When zero, the block is eligible to be evicted.
        </p></li><li class="listitem"><p>
          <code class="literal">IS_HASHED</code>
        </p><p>
          Whether a hash index has been built on this page.
        </p></li><li class="listitem"><p>
          <code class="literal">NEWEST_MODIFICATION</code>
        </p><p>
          The Log Sequence Number of the youngest modification.
        </p></li><li class="listitem"><p>
          <code class="literal">OLDEST_MODIFICATION</code>
        </p><p>
          The Log Sequence Number of the oldest modification.
        </p></li><li class="listitem"><p>
          <code class="literal">ACCESS_TIME</code>
        </p><p>
          An abstract number used to judge the first access time of the
          page.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The name of the table the page belongs to. This column is
          applicable only to pages with a <code class="literal">PAGE_TYPE</code>
          value of <code class="literal">INDEX</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">INDEX_NAME</code>
        </p><p>
          The name of the index the page belongs to. This can be the
          name of a clustered index or a secondary index. This column is
          applicable only to pages with a <code class="literal">PAGE_TYPE</code>
          value of <code class="literal">INDEX</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">NUMBER_RECORDS</code>
        </p><p>
          The number of records within the page.
        </p></li><li class="listitem"><p>
          <code class="literal">DATA_SIZE</code>
        </p><p>
          The sum of the sizes of the records. This column is applicable
          only to pages with a <code class="literal">PAGE_TYPE</code> value of
          <code class="literal">INDEX</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">COMPRESSED_SIZE</code>
        </p><p>
          The compressed page size. <code class="literal">NULL</code> for pages
          that are not compressed.
        </p></li><li class="listitem"><p>
          <code class="literal">COMPRESSED</code>
        </p><p>
          Whether the page is compressed.
        </p></li><li class="listitem"><p>
          <code class="literal">IO_FIX</code>
        </p><p>
          Whether any I/O is pending for this page:
          <code class="literal">IO_NONE</code> = no pending I/O,
          <code class="literal">IO_READ</code> = read pending,
          <code class="literal">IO_WRITE</code> = write pending.
        </p></li><li class="listitem"><p>
          <code class="literal">IS_OLD</code>
        </p><p>
          Whether the block is in the sublist of old blocks in the LRU
          list.
        </p></li><li class="listitem"><p>
          <code class="literal">FREE_PAGE_CLOCK</code>
        </p><p>
          The value of the <code class="literal">freed_page_clock</code> counter
          when the block was the last placed at the head of the LRU
          list. The <code class="literal">freed_page_clock</code> counter tracks
          the number of blocks removed from the end of the LRU list.
</p></li></ul>
</div>
<h4><a name="idm140091568064032"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_PAGE_LRU LIMIT 1\G</code></strong>
*************************** 1. row ***************************
            POOL_ID: 0
       LRU_POSITION: 0
              SPACE: 97
        PAGE_NUMBER: 1984
          PAGE_TYPE: INDEX
         FLUSH_TYPE: 1
          FIX_COUNT: 0
          IS_HASHED: YES
NEWEST_MODIFICATION: 719490396
OLDEST_MODIFICATION: 0
        ACCESS_TIME: 3378383796
         TABLE_NAME: `employees`.`salaries`
         INDEX_NAME: PRIMARY
     NUMBER_RECORDS: 468
          DATA_SIZE: 14976
    COMPRESSED_SIZE: 0
         COMPRESSED: NO
             IO_FIX: IO_NONE
             IS_OLD: YES
    FREE_PAGE_CLOCK: 0
</pre>
<h4><a name="idm140091568061072"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          This table is useful primarily for expert-level performance
          monitoring, or when developing performance-related extensions
          for MySQL.
        </p></li><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
        </p></li><li class="listitem"><p>
          Querying this table can require MySQL to allocate a large
          block of contiguous memory, more than 64 bytes times the
          number of active pages in the buffer pool. This allocation
          could potentially cause an out-of-memory error, especially for
          systems with multi-gigabyte buffer pools.
        </p></li><li class="listitem"><p>
          Querying this table requires MySQL to lock the data structure
          representing the buffer pool while traversing the LRU list,
          which can reduce concurrency, especially for systems with
          multi-gigabyte buffer pools.
        </p></li><li class="listitem"><p>
          When tables, table rows, partitions, or indexes are deleted,
          associated pages remain in the buffer pool until space is
          required for other data. The
          <a class="link" href="information-schema.html#innodb-buffer-page-lru-table" title="25.39.2 The INFORMATION_SCHEMA INNODB_BUFFER_PAGE_LRU Table"><code class="literal">INNODB_BUFFER_PAGE_LRU</code></a> table
          reports information about these pages until they are evicted
          from the buffer pool. For more information about how the
          <code class="literal">InnoDB</code> manages buffer pool data, see
          <a class="xref" href="innodb-storage-engine.html#innodb-buffer-pool" title="15.5.1 Buffer Pool">Section 15.5.1, “Buffer Pool”</a>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-buffer-pool-stats-table"></a>25.39.3 The INFORMATION_SCHEMA INNODB_BUFFER_POOL_STATS Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091568045616"></a><p>
      The <a class="link" href="information-schema.html#innodb-buffer-pool-stats-table" title="25.39.3 The INFORMATION_SCHEMA INNODB_BUFFER_POOL_STATS Table"><code class="literal">INNODB_BUFFER_POOL_STATS</code></a> table
      provides much of the same buffer pool information provided in
      <a class="link" href="sql-syntax.html#show-engine" title="13.7.6.15 SHOW ENGINE Syntax"><code class="literal">SHOW ENGINE INNODB
      STATUS</code></a> output. Much of the same information may also be
      obtained using <code class="literal">InnoDB</code> buffer pool
      <a class="link" href="server-administration.html#server-status-variables" title="5.1.10 Server Status Variables">server status
      variables</a>.
    </p><p>
      The idea of making pages in the buffer pool <span class="quote">“<span class="quote">young</span>”</span>
      or <span class="quote">“<span class="quote">not young</span>”</span> refers to transferring them between
      the <a class="link" href="glossary.html#glos_sublist" title="sublist">sublists</a> at the head and
      tail of the buffer pool data structure. Pages made
      <span class="quote">“<span class="quote">young</span>”</span> take longer to age out of the buffer pool,
      while pages made <span class="quote">“<span class="quote">not young</span>”</span> are moved much closer to
      the point of <a class="link" href="glossary.html#glos_eviction" title="eviction">eviction</a>.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-buffer-pool-tables" title="15.14.5 InnoDB INFORMATION_SCHEMA Buffer Pool Tables">Section 15.14.5, “InnoDB INFORMATION_SCHEMA Buffer Pool Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-buffer-pool-stats-table" title="25.39.3 The INFORMATION_SCHEMA INNODB_BUFFER_POOL_STATS Table"><code class="literal">INNODB_BUFFER_POOL_STATS</code></a> table
      has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">POOL_ID</code>
        </p><p>
          The buffer pool ID. This is an identifier to distinguish
          between multiple buffer pool instances.
        </p></li><li class="listitem"><p>
          <code class="literal">POOL_SIZE</code>
        </p><p>
          The <code class="literal">InnoDB</code> buffer pool size in pages.
        </p></li><li class="listitem"><p>
          <code class="literal">FREE_BUFFERS</code>
        </p><p>
          The number of free pages in the <code class="literal">InnoDB</code>
          buffer pool.
        </p></li><li class="listitem"><p>
          <code class="literal">DATABASE_PAGES</code>
        </p><p>
          The number of pages in the <code class="literal">InnoDB</code> buffer
          pool containing data. This number includes both dirty and
          clean pages.
        </p></li><li class="listitem"><p>
          <code class="literal">OLD_DATABASE_PAGES</code>
        </p><p>
          The number of pages in the <code class="literal">old</code> buffer pool
          sublist.
        </p></li><li class="listitem"><p>
          <code class="literal">MODIFIED_DATABASE_PAGES</code>
        </p><p>
          The number of modified (dirty) database pages.
        </p></li><li class="listitem"><p>
          <code class="literal">PENDING_DECOMPRESS</code>
        </p><p>
          The number of pages pending decompression.
        </p></li><li class="listitem"><p>
          <code class="literal">PENDING_READS</code>
        </p><p>
          The number of pending reads.
        </p></li><li class="listitem"><p>
          <code class="literal">PENDING_FLUSH_LRU</code>
        </p><p>
          The number of pages pending flush in the LRU.
        </p></li><li class="listitem"><p>
          <code class="literal">PENDING_FLUSH_LIST</code>
        </p><p>
          The number of pages pending flush in the flush list.
        </p></li><li class="listitem"><p>
          <code class="literal">PAGES_MADE_YOUNG</code>
        </p><p>
          The number of pages made young.
        </p></li><li class="listitem"><p>
          <code class="literal">PAGES_NOT_MADE_YOUNG</code>
        </p><p>
          The number of pages not made young.
        </p></li><li class="listitem"><p>
          <code class="literal">PAGES_MADE_YOUNG_RATE</code>
        </p><p>
          The number of pages made young per second (pages made young
          since the last printout / time elapsed).
        </p></li><li class="listitem"><p>
          <code class="literal">PAGES_MADE_NOT_YOUNG_RATE</code>
        </p><p>
          The number of pages not made per second (pages not made young
          since the last printout / time elapsed).
        </p></li><li class="listitem"><p>
          <code class="literal">NUMBER_PAGES_READ</code>
        </p><p>
          The number of pages read.
        </p></li><li class="listitem"><p>
          <code class="literal">NUMBER_PAGES_CREATED</code>
        </p><p>
          The number of pages created.
        </p></li><li class="listitem"><p>
          <code class="literal">NUMBER_PAGES_WRITTEN</code>
        </p><p>
          The number of pages written.
        </p></li><li class="listitem"><p>
          <code class="literal">PAGES_READ_RATE</code>
        </p><p>
          The number of pages read per second (pages read since the last
          printout / time elapsed).
        </p></li><li class="listitem"><p>
          <code class="literal">PAGES_CREATE_RATE</code>
        </p><p>
          The number of pages created per second (pages created since
          the last printout / time elapsed).
        </p></li><li class="listitem"><p>
          <code class="literal">PAGES_WRITTEN_RATE</code>
        </p><p>
          The number of pages written per second (pages written since
          the last printout / time elapsed).
        </p></li><li class="listitem"><p>
          <code class="literal">NUMBER_PAGES_GET</code>
        </p><p>
          The number of logical read requests.
        </p></li><li class="listitem"><p>
          <code class="literal">HIT_RATE</code>
        </p><p>
          The buffer pool hit rate.
        </p></li><li class="listitem"><p>
          <code class="literal">YOUNG_MAKE_PER_THOUSAND_GETS</code>
        </p><p>
          The number of pages made young per thousand gets.
        </p></li><li class="listitem"><p>
          <code class="literal">NOT_YOUNG_MAKE_PER_THOUSAND_GETS</code>
        </p><p>
          The number of pages not made young per thousand gets.
        </p></li><li class="listitem"><p>
          <code class="literal">NUMBER_PAGES_READ_AHEAD</code>
        </p><p>
          The number of pages read ahead.
        </p></li><li class="listitem"><p>
          <code class="literal">NUMBER_READ_AHEAD_EVICTED</code>
        </p><p>
          The number of pages read into the <code class="literal">InnoDB</code>
          buffer pool by the read-ahead background thread that were
          subsequently evicted without having been accessed by queries.
        </p></li><li class="listitem"><p>
          <code class="literal">READ_AHEAD_RATE</code>
        </p><p>
          The read-ahead rate per second (pages read ahead since the
          last printout / time elapsed).
        </p></li><li class="listitem"><p>
          <code class="literal">READ_AHEAD_EVICTED_RATE</code>
        </p><p>
          The number of read-ahead pages evicted without access per
          second (read-ahead pages not accessed since the last printout
          / time elapsed).
        </p></li><li class="listitem"><p>
          <code class="literal">LRU_IO_TOTAL</code>
        </p><p>
          Total LRU I/O.
        </p></li><li class="listitem"><p>
          <code class="literal">LRU_IO_CURRENT</code>
        </p><p>
          LRU I/O for the current interval.
        </p></li><li class="listitem"><p>
          <code class="literal">UNCOMPRESS_TOTAL</code>
        </p><p>
          The total number of pages decompressed.
        </p></li><li class="listitem"><p>
          <code class="literal">UNCOMPRESS_CURRENT</code>
        </p><p>
          The number of pages decompressed in the current interval.
</p></li></ul>
</div>
<h4><a name="idm140091567966528"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_BUFFER_POOL_STATS\G</code></strong>
*************************** 1. row ***************************
                         POOL_ID: 0
                       POOL_SIZE: 8192
                    FREE_BUFFERS: 1
                  DATABASE_PAGES: 8085
              OLD_DATABASE_PAGES: 2964
         MODIFIED_DATABASE_PAGES: 0
              PENDING_DECOMPRESS: 0
                   PENDING_READS: 0
               PENDING_FLUSH_LRU: 0
              PENDING_FLUSH_LIST: 0
                PAGES_MADE_YOUNG: 22821
            PAGES_NOT_MADE_YOUNG: 3544303
           PAGES_MADE_YOUNG_RATE: 357.62602199870594
       PAGES_MADE_NOT_YOUNG_RATE: 0
               NUMBER_PAGES_READ: 2389
            NUMBER_PAGES_CREATED: 12385
            NUMBER_PAGES_WRITTEN: 13111
                 PAGES_READ_RATE: 0
               PAGES_CREATE_RATE: 0
              PAGES_WRITTEN_RATE: 0
                NUMBER_PAGES_GET: 33322210
                        HIT_RATE: 1000
    YOUNG_MAKE_PER_THOUSAND_GETS: 18
NOT_YOUNG_MAKE_PER_THOUSAND_GETS: 0
         NUMBER_PAGES_READ_AHEAD: 2024
       NUMBER_READ_AHEAD_EVICTED: 0
                 READ_AHEAD_RATE: 0
         READ_AHEAD_EVICTED_RATE: 0
                    LRU_IO_TOTAL: 0
                  LRU_IO_CURRENT: 0
                UNCOMPRESS_TOTAL: 0
              UNCOMPRESS_CURRENT: 0
</pre>
<h4><a name="idm140091567962880"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          This table is useful primarily for expert-level performance
          monitoring, or when developing performance-related extensions
          for MySQL.
        </p></li><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-cached-indexes-table"></a>25.39.4 The INFORMATION_SCHEMA INNODB_CACHED_INDEXES Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567953328"></a><p>
      The <a class="link" href="information-schema.html#innodb-cached-indexes-table" title="25.39.4 The INFORMATION_SCHEMA INNODB_CACHED_INDEXES Table"><code class="literal">INNODB_CACHED_INDEXES</code></a> table
      reports the number of index pages cached in the
      <code class="literal">InnoDB</code> buffer pool for each index.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-buffer-pool-tables" title="15.14.5 InnoDB INFORMATION_SCHEMA Buffer Pool Tables">Section 15.14.5, “InnoDB INFORMATION_SCHEMA Buffer Pool Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-cached-indexes-table" title="25.39.4 The INFORMATION_SCHEMA INNODB_CACHED_INDEXES Table"><code class="literal">INNODB_CACHED_INDEXES</code></a> table has
      these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">SPACE_ID</code>
        </p><p>
          The tablespace ID.
        </p></li><li class="listitem"><p>
          <code class="literal">INDEX_ID</code>
        </p><p>
          An identifier for the index. Index identifiers are unique
          across all the databases in an instance.
        </p></li><li class="listitem"><p>
          <code class="literal">N_CACHED_PAGES</code>
        </p><p>
          The number of index pages cached in the
          <code class="literal">InnoDB</code> buffer pool.
</p></li></ul>
</div>
<h4><a name="idm140091567939552"></a>Examples</h4>
<p>
      This query returns the number of index pages cached in the
      <code class="literal">InnoDB</code> buffer pool for a specific index:
    </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_CACHED_INDEXES WHERE INDEX_ID=65\G</code></strong>
*************************** 1. row ***************************
      SPACE_ID: 4294967294
      INDEX_ID: 65
N_CACHED_PAGES: 45
</pre><p>
      This query returns the number of index pages cached in the
      <code class="literal">InnoDB</code> buffer pool for each index, using the
      <a class="link" href="information-schema.html#innodb-indexes-table" title="25.39.19 The INFORMATION_SCHEMA INNODB_INDEXES Table"><code class="literal">INNODB_INDEXES</code></a> and
      <a class="link" href="information-schema.html#innodb-tables-table" title="25.39.24 The INFORMATION_SCHEMA INNODB_TABLES Table"><code class="literal">INNODB_TABLES</code></a> tables to resolve the
      table name and index name for each <code class="literal">INDEX_ID</code>
      value.
    </p><pre data-lang="sql" class="programlisting">
SELECT
  tables.NAME AS table_name,
  indexes.NAME AS index_name,
  cached.N_CACHED_PAGES AS n_cached_pages
FROM
  INFORMATION_SCHEMA.INNODB_CACHED_INDEXES AS cached,
  INFORMATION_SCHEMA.INNODB_INDEXES AS indexes,
  INFORMATION_SCHEMA.INNODB_TABLES AS tables
WHERE
  cached.INDEX_ID = indexes.INDEX_ID
  AND indexes.TABLE_ID = tables.TABLE_ID;
</pre>
<h4><a name="idm140091567930160"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-cmp-table"></a>25.39.5 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567921664"></a><a class="indexterm" name="idm140091567920192"></a><p>
      The <a class="link" href="information-schema.html#innodb-cmp-table" title="25.39.5 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables"><code class="literal">INNODB_CMP</code></a> and
      <a class="link" href="information-schema.html#innodb-cmp-table" title="25.39.5 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables"><code class="literal">INNODB_CMP_RESET</code></a>
      tables provide status information on operations related to
      <a class="link" href="glossary.html#glos_compression" title="compression">compressed</a>
      <code class="literal">InnoDB</code> tables.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-cmp-table" title="25.39.5 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables"><code class="literal">INNODB_CMP</code></a> and
      <a class="link" href="information-schema.html#innodb-cmp-table" title="25.39.5 The INFORMATION_SCHEMA INNODB_CMP and INNODB_CMP_RESET Tables"><code class="literal">INNODB_CMP_RESET</code></a>
      tables have these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">PAGE_SIZE</code>
        </p><p>
          The compressed page size in bytes.
        </p></li><li class="listitem"><p>
          <code class="literal">COMPRESS_OPS</code>
        </p><p>
          The number of times a B-tree page of size
          <code class="literal">PAGE_SIZE</code> has been compressed. Pages are
          compressed whenever an empty page is created or the space for
          the uncompressed modification log runs out.
        </p></li><li class="listitem"><p>
          <code class="literal">COMPRESS_OPS_OK</code>
        </p><p>
          The number of times a B-tree page of size
          <code class="literal">PAGE_SIZE</code> has been successfully compressed.
          This count should never exceed
          <code class="literal">COMPRESS_OPS</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">COMPRESS_TIME</code>
        </p><p>
          The total time in seconds used for attempts to compress B-tree
          pages of size <code class="literal">PAGE_SIZE</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">UNCOMPRESS_OPS</code>
        </p><p>
          The number of times a B-tree page of size
          <code class="literal">PAGE_SIZE</code> has been uncompressed. B-tree
          pages are uncompressed whenever compression fails or at first
          access when the uncompressed page does not exist in the buffer
          pool.
        </p></li><li class="listitem"><p>
          <code class="literal">UNCOMPRESS_TIME</code>
        </p><p>
          The total time in seconds used for uncompressing B-tree pages
          of the size <code class="literal">PAGE_SIZE</code>.
</p></li></ul>
</div>
<h4><a name="idm140091567894656"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_CMP\G</code></strong>
*************************** 1. row ***************************
      page_size: 1024
   compress_ops: 0
compress_ops_ok: 0
  compress_time: 0
 uncompress_ops: 0
uncompress_time: 0
*************************** 2. row ***************************
      page_size: 2048
   compress_ops: 0
compress_ops_ok: 0
  compress_time: 0
 uncompress_ops: 0
uncompress_time: 0
*************************** 3. row ***************************
      page_size: 4096
   compress_ops: 0
compress_ops_ok: 0
  compress_time: 0
 uncompress_ops: 0
uncompress_time: 0
*************************** 4. row ***************************
      page_size: 8192
   compress_ops: 86955
compress_ops_ok: 81182
  compress_time: 27
 uncompress_ops: 26828
uncompress_time: 5
*************************** 5. row ***************************
      page_size: 16384
   compress_ops: 0
compress_ops_ok: 0
  compress_time: 0
 uncompress_ops: 0
uncompress_time: 0
</pre>
<h4><a name="idm140091567891392"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Use these tables to measure the effectiveness of
          <code class="literal">InnoDB</code> table
          <a class="link" href="glossary.html#glos_compression" title="compression">compression</a> in your
          database.
        </p></li><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
        </p></li><li class="listitem"><p>
          For usage information, see
          <a class="xref" href="innodb-storage-engine.html#innodb-compression-tuning-monitoring" title="15.9.1.4 Monitoring InnoDB Table Compression at Runtime">Section 15.9.1.4, “Monitoring InnoDB Table Compression at Runtime”</a> and
          <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-examples-compression-sect" title="15.14.1.3 Using the Compression Information Schema Tables">Section 15.14.1.3, “Using the Compression Information Schema Tables”</a>.
          For general information about <code class="literal">InnoDB</code> table
          compression, see <a class="xref" href="innodb-storage-engine.html#innodb-compression" title="15.9 InnoDB Table and Page Compression">Section 15.9, “InnoDB Table and Page Compression”</a>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-cmpmem-table"></a>25.39.6 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567876640"></a><a class="indexterm" name="idm140091567875168"></a><p>
      The <a class="link" href="information-schema.html#innodb-cmpmem-table" title="25.39.6 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables"><code class="literal">INNODB_CMPMEM</code></a> and
      <a class="link" href="information-schema.html#innodb-cmpmem-table" title="25.39.6 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables"><code class="literal">INNODB_CMPMEM_RESET</code></a>
      tables provide status information on compressed
      <a class="link" href="glossary.html#glos_page" title="page">pages</a> within the
      <code class="literal">InnoDB</code> <a class="link" href="glossary.html#glos_buffer_pool" title="buffer pool">buffer
      pool</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-cmpmem-table" title="25.39.6 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables"><code class="literal">INNODB_CMPMEM</code></a> and
      <a class="link" href="information-schema.html#innodb-cmpmem-table" title="25.39.6 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables"><code class="literal">INNODB_CMPMEM_RESET</code></a>
      tables have these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">PAGE_SIZE</code>
        </p><p>
          The block size in bytes. Each record of this table describes
          blocks of this size.
        </p></li><li class="listitem"><p>
          <code class="literal">BUFFER_POOL_INSTANCE</code>
        </p><p>
          A unique identifier for the buffer pool instance.
        </p></li><li class="listitem"><p>
          <code class="literal">PAGES_USED</code>
        </p><p>
          The number of blocks of size <code class="literal">PAGE_SIZE</code> that
          are currently in use.
        </p></li><li class="listitem"><p>
          <code class="literal">PAGES_FREE</code>
        </p><p>
          The number of blocks of size <code class="literal">PAGE_SIZE</code> that
          are currently available for allocation. This column shows the
          external fragmentation in the memory pool. Ideally, these
          numbers should be at most 1.
        </p></li><li class="listitem"><p>
          <code class="literal">RELOCATION_OPS</code>
        </p><p>
          The number of times a block of size
          <code class="literal">PAGE_SIZE</code> has been relocated. The buddy
          system can relocate the allocated <span class="quote">“<span class="quote">buddy
          neighbor</span>”</span> of a freed block when it tries to form a
          bigger freed block. Reading from the
          <a class="link" href="information-schema.html#innodb-cmpmem-table" title="25.39.6 The INFORMATION_SCHEMA INNODB_CMPMEM and INNODB_CMPMEM_RESET Tables"><code class="literal">INNODB_CMPMEM_RESET</code></a>
          table resets this count.
        </p></li><li class="listitem"><p>
          <code class="literal">RELOCATION_TIME</code>
        </p><p>
          The total time in microseconds used for relocating blocks of
          size <code class="literal">PAGE_SIZE</code>. Reading from the table
          <code class="literal">INNODB_CMPMEM_RESET</code> resets this count.
</p></li></ul>
</div>
<h4><a name="idm140091567847840"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_CMPMEM\G</code></strong>
*************************** 1. row ***************************
           page_size: 1024
buffer_pool_instance: 0
          pages_used: 0
          pages_free: 0
      relocation_ops: 0
     relocation_time: 0
*************************** 2. row ***************************
           page_size: 2048
buffer_pool_instance: 0
          pages_used: 0
          pages_free: 0
      relocation_ops: 0
     relocation_time: 0
*************************** 3. row ***************************
           page_size: 4096
buffer_pool_instance: 0
          pages_used: 0
          pages_free: 0
      relocation_ops: 0
     relocation_time: 0
*************************** 4. row ***************************
           page_size: 8192
buffer_pool_instance: 0
          pages_used: 7673
          pages_free: 15
      relocation_ops: 4638
     relocation_time: 0
*************************** 5. row ***************************
           page_size: 16384
buffer_pool_instance: 0
          pages_used: 0
          pages_free: 0
      relocation_ops: 0
     relocation_time: 0
</pre>
<h4><a name="idm140091567844432"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Use these tables to measure the effectiveness of
          <code class="literal">InnoDB</code> table
          <a class="link" href="glossary.html#glos_compression" title="compression">compression</a> in your
          database.
        </p></li><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
        </p></li><li class="listitem"><p>
          For usage information, see
          <a class="xref" href="innodb-storage-engine.html#innodb-compression-tuning-monitoring" title="15.9.1.4 Monitoring InnoDB Table Compression at Runtime">Section 15.9.1.4, “Monitoring InnoDB Table Compression at Runtime”</a> and
          <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-examples-compression-sect" title="15.14.1.3 Using the Compression Information Schema Tables">Section 15.14.1.3, “Using the Compression Information Schema Tables”</a>.
          For general information about <code class="literal">InnoDB</code> table
          compression, see <a class="xref" href="innodb-storage-engine.html#innodb-compression" title="15.9 InnoDB Table and Page Compression">Section 15.9, “InnoDB Table and Page Compression”</a>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-cmp-per-index-table"></a>25.39.7 The INFORMATION_SCHEMA INNODB_CMP_PER_INDEX and
INNODB_CMP_PER_INDEX_RESET Tables</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm140091567829680"></a><a class="indexterm" name="idm140091567828224"></a><p>
      The <a class="link" href="information-schema.html#innodb-cmp-per-index-table" title="25.39.7 The INFORMATION_SCHEMA INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET Tables"><code class="literal">INNODB_CMP_PER_INDEX</code></a> and
      <a class="link" href="information-schema.html#innodb-cmp-per-index-table" title="25.39.7 The INFORMATION_SCHEMA INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET Tables"><code class="literal">INNODB_CMP_PER_INDEX_RESET</code></a>
      tables provide status information on operations related to
      <a class="link" href="glossary.html#glos_compression" title="compression">compressed</a>
      <code class="literal">InnoDB</code> tables and indexes, with separate
      statistics for each combination of database, table, and index, to
      help you evaluate the performance and usefulness of compression
      for specific tables.
    </p><p>
      For a compressed <code class="literal">InnoDB</code> table, both the table
      data and all the <a class="link" href="glossary.html#glos_secondary_index" title="secondary index">secondary
      indexes</a> are compressed. In this context, the table data is
      treated as just another index, one that happens to contain all the
      columns: the <a class="link" href="glossary.html#glos_clustered_index" title="clustered index">clustered
      index</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-cmp-per-index-table" title="25.39.7 The INFORMATION_SCHEMA INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET Tables"><code class="literal">INNODB_CMP_PER_INDEX</code></a> and
      <a class="link" href="information-schema.html#innodb-cmp-per-index-table" title="25.39.7 The INFORMATION_SCHEMA INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET Tables"><code class="literal">INNODB_CMP_PER_INDEX_RESET</code></a>
      tables have these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">DATABASE_NAME</code>
        </p><p>
          The schema (database) containing the applicable table.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_NAME</code>
        </p><p>
          The table to monitor for compression statistics.
        </p></li><li class="listitem"><p>
          <code class="literal">INDEX_NAME</code>
        </p><p>
          The index to monitor for compression statistics.
        </p></li><li class="listitem"><p>
          <code class="literal">COMPRESS_OPS</code>
        </p><p>
          The number of compression operations attempted.
          <a class="link" href="glossary.html#glos_page" title="page">Pages</a> are compressed whenever
          an empty page is created or the space for the uncompressed
          modification log runs out.
        </p></li><li class="listitem"><p>
          <code class="literal">COMPRESS_OPS_OK</code>
        </p><p>
          The number of successful compression operations. Subtract from
          the <code class="literal">COMPRESS_OPS</code> value to get the number of
          <a class="link" href="glossary.html#glos_compression_failure" title="compression failure">compression
          failures</a>. Divide by the <code class="literal">COMPRESS_OPS</code>
          value to get the percentage of compression failures.
        </p></li><li class="listitem"><p>
          <code class="literal">COMPRESS_TIME</code>
        </p><p>
          The total time in seconds used for compressing data in this
          index.
        </p></li><li class="listitem"><p>
          <code class="literal">UNCOMPRESS_OPS</code>
        </p><p>
          The number of uncompression operations performed. Compressed
          <code class="literal">InnoDB</code> pages are uncompressed whenever
          compression
          <a class="link" href="glossary.html#glos_compression_failure" title="compression failure">fails</a>, or the
          first time a compressed page is accessed in the
          <a class="link" href="glossary.html#glos_buffer_pool" title="buffer pool">buffer pool</a> and the
          uncompressed page does not exist.
        </p></li><li class="listitem"><p>
          <code class="literal">UNCOMPRESS_TIME</code>
        </p><p>
          The total time in seconds used for uncompressing data in this
          index.
</p></li></ul>
</div>
<h4><a name="idm140091567794208"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_CMP_PER_INDEX\G</code></strong>
*************************** 1. row ***************************
  database_name: employees
     table_name: salaries
     index_name: PRIMARY
   compress_ops: 0
compress_ops_ok: 0
  compress_time: 0
 uncompress_ops: 23451
uncompress_time: 4
*************************** 2. row ***************************
  database_name: employees
     table_name: salaries
     index_name: emp_no
   compress_ops: 0
compress_ops_ok: 0
  compress_time: 0
 uncompress_ops: 1597
uncompress_time: 0
</pre>
<h4><a name="idm140091567791376"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Use these tables to measure the effectiveness of
          <code class="literal">InnoDB</code> table
          <a class="link" href="glossary.html#glos_compression" title="compression">compression</a> for
          specific tables, indexes, or both.
        </p></li><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query these tables.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of these tables,
          including data types and default values.
        </p></li><li class="listitem"><p>
          Because collecting separate measurements for every index
          imposes substantial performance overhead,
          <a class="link" href="information-schema.html#innodb-cmp-per-index-table" title="25.39.7 The INFORMATION_SCHEMA INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET Tables"><code class="literal">INNODB_CMP_PER_INDEX</code></a> and
          <a class="link" href="information-schema.html#innodb-cmp-per-index-table" title="25.39.7 The INFORMATION_SCHEMA INNODB_CMP_PER_INDEX and INNODB_CMP_PER_INDEX_RESET Tables"><code class="literal">INNODB_CMP_PER_INDEX_RESET</code></a>
          statistics are not gathered by default. You must enable the
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_cmp_per_index_enabled"><code class="literal">innodb_cmp_per_index_enabled</code></a>
          system variable before performing the operations on compressed
          tables that you want to monitor.
        </p></li><li class="listitem"><p>
          For usage information, see
          <a class="xref" href="innodb-storage-engine.html#innodb-compression-tuning-monitoring" title="15.9.1.4 Monitoring InnoDB Table Compression at Runtime">Section 15.9.1.4, “Monitoring InnoDB Table Compression at Runtime”</a> and
          <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-examples-compression-sect" title="15.14.1.3 Using the Compression Information Schema Tables">Section 15.14.1.3, “Using the Compression Information Schema Tables”</a>.
          For general information about <code class="literal">InnoDB</code> table
          compression, see <a class="xref" href="innodb-storage-engine.html#innodb-compression" title="15.9 InnoDB Table and Page Compression">Section 15.9, “InnoDB Table and Page Compression”</a>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-columns-table"></a>25.39.8 The INFORMATION_SCHEMA INNODB_COLUMNS Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567771760"></a><p>
      The <a class="link" href="information-schema.html#innodb-columns-table" title="25.39.8 The INFORMATION_SCHEMA INNODB_COLUMNS Table"><code class="literal">INNODB_COLUMNS</code></a> table provides
      metadata about <code class="literal">InnoDB</code> table columns.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-system-tables" title="15.14.3 InnoDB INFORMATION_SCHEMA Schema Object Tables">Section 15.14.3, “InnoDB INFORMATION_SCHEMA Schema Object Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-columns-table" title="25.39.8 The INFORMATION_SCHEMA INNODB_COLUMNS Table"><code class="literal">INNODB_COLUMNS</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TABLE_ID</code>
        </p><p>
          An identifier representing the table associated with the
          column; the same value as
          <code class="literal">INNODB_TABLES.TABLE_ID</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">NAME</code>
        </p><p>
          The name of the column. These names can be uppercase or
          lowercase depending on the
          <a class="link" href="server-administration.html#sysvar_lower_case_table_names"><code class="literal">lower_case_table_names</code></a>
          setting. There are no special system-reserved names for
          columns.
        </p></li><li class="listitem"><p>
          <code class="literal">POS</code>
        </p><p>
          The ordinal position of the column within the table, starting
          from 0 and incrementing sequentially. When a column is
          dropped, the remaining columns are reordered so that the
          sequence has no gaps. The <code class="literal">POS</code> value for a
          virtual generated column encodes the column sequence number
          and ordinal position of the column. For more information, see
          the <code class="literal">POS</code> column description in
          <a class="xref" href="information-schema.html#innodb-virtual-table" title="25.39.30 The INFORMATION_SCHEMA INNODB_VIRTUAL Table">Section 25.39.30, “The INFORMATION_SCHEMA INNODB_VIRTUAL Table”</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">MTYPE</code>
        </p><p>
          Stands for <span class="quote">“<span class="quote">main type</span>”</span>. A numeric identifier for
          the column type. 1 = <code class="literal">VARCHAR</code>, 2 =
          <code class="literal">CHAR</code>, 3 = <code class="literal">FIXBINARY</code>, 4 =
          <code class="literal">BINARY</code>, 5 = <code class="literal">BLOB</code>, 6 =
          <code class="literal">INT</code>, 7 = <code class="literal">SYS_CHILD</code>, 8 =
          <code class="literal">SYS</code>, 9 = <code class="literal">FLOAT</code>, 10 =
          <code class="literal">DOUBLE</code>, 11 = <code class="literal">DECIMAL</code>, 12
          = <code class="literal">VARMYSQL</code>, 13 = <code class="literal">MYSQL</code>,
          14 = <code class="literal">GEOMETRY</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">PRTYPE</code>
        </p><p>
          The <code class="literal">InnoDB</code> <span class="quote">“<span class="quote">precise type</span>”</span>, a
          binary value with bits representing MySQL data type, character
          set code, and nullability.
        </p></li><li class="listitem"><p>
          <code class="literal">LEN</code>
        </p><p>
          The column length, for example 4 for <code class="literal">INT</code>
          and 8 for <code class="literal">BIGINT</code>. For character columns in
          multibyte character sets, this length value is the maximum
          length in bytes needed to represent a definition such as
          <code class="literal">VARCHAR(<em class="replaceable"><code>N</code></em>)</code>; that
          is, it might be
          <code class="literal">2*<em class="replaceable"><code>N</code></em></code>,
          <code class="literal">3*<em class="replaceable"><code>N</code></em></code>, and so on
          depending on the character encoding.
        </p></li><li class="listitem"><p>
          <code class="literal">HAS_DEFAULT</code>
        </p><p>
          A boolean value indicating whether a column that was added
          instantly using
          <a class="link" href="sql-syntax.html#alter-table" title="13.1.9 ALTER TABLE Syntax"><code class="literal">ALTER TABLE ...
          ADD COLUMN</code></a> with <code class="literal">ALGORITHM=INSTANT</code>
          has a default value. All columns added instantly have a
          default value, which makes this column an indicator of whether
          the column was added instantly.
        </p></li><li class="listitem"><p>
          <code class="literal">DEFAULT_VALUE</code>
        </p><p>
          The initial default value of a column that was added instantly
          using <a class="link" href="sql-syntax.html#alter-table" title="13.1.9 ALTER TABLE Syntax"><code class="literal">ALTER TABLE
          ... ADD COLUMN</code></a> with
          <code class="literal">ALGORITHM=INSTANT</code>. If the default value is
          <code class="literal">NULL</code> or was not specified, this column
          reports <code class="literal">NULL</code>. An explicitly specified
          non-<code class="literal">NULL</code> default value is shown in an
          internal binary format. Subsequent modifications of the column
          default value do not change the value reported by this column.
</p></li></ul>
</div>
<h4><a name="idm140091567721616"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_COLUMNS where TABLE_ID = 71\G</code></strong>
*************************** 1. row ***************************
     TABLE_ID: 71
         NAME: col1
          POS: 0
        MTYPE: 6
       PRTYPE: 1027
          LEN: 4
  HAS_DEFAULT: 0
DEFAULT_VALUE: NULL
*************************** 2. row ***************************
     TABLE_ID: 71
         NAME: col2
          POS: 1
        MTYPE: 2
       PRTYPE: 524542
          LEN: 10
  HAS_DEFAULT: 0
DEFAULT_VALUE: NULL
*************************** 3. row ***************************
     TABLE_ID: 71
         NAME: col3
          POS: 2
        MTYPE: 1
       PRTYPE: 524303
          LEN: 10
  HAS_DEFAULT: 0
DEFAULT_VALUE: NULL
</pre>
<h4><a name="idm140091567718608"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-datafiles-table"></a>25.39.9 The INFORMATION_SCHEMA INNODB_DATAFILES Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567710128"></a><p>
      The <a class="link" href="information-schema.html#innodb-datafiles-table" title="25.39.9 The INFORMATION_SCHEMA INNODB_DATAFILES Table"><code class="literal">INNODB_DATAFILES</code></a> table provides
      data file path information for <code class="literal">InnoDB</code>
      file-per-table and general tablespaces.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-system-tables" title="15.14.3 InnoDB INFORMATION_SCHEMA Schema Object Tables">Section 15.14.3, “InnoDB INFORMATION_SCHEMA Schema Object Tables”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        The <code class="literal">INFORMATION_SCHEMA</code>
        <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> table reports metadata for
        <code class="literal">InnoDB</code> tablespace types including
        file-per-table tablespaces, general tablespaces, the system
        tablespace, the global temporary tablespace, and undo
        tablespaces.
</p>
</div>
<p>
      The <a class="link" href="information-schema.html#innodb-datafiles-table" title="25.39.9 The INFORMATION_SCHEMA INNODB_DATAFILES Table"><code class="literal">INNODB_DATAFILES</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">SPACE</code>
        </p><p>
          The tablespace ID.
        </p></li><li class="listitem"><p>
          <code class="literal">PATH</code>
        </p><p>
          The tablespace data file path. If a
          <a class="link" href="glossary.html#glos_file_per_table" title="file-per-table">file-per-table</a>
          tablespace is created in a location outside the MySQL data
          directory, the path value is a fully qualified directory path.
          Otherwise, the path is relative to the data directory.
</p></li></ul>
</div>
<h4><a name="idm140091567694528"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_DATAFILES WHERE SPACE = 57\G</code></strong>
*************************** 1. row ***************************
SPACE: 57
 PATH: ./test/t1.ibd
</pre>
<h4><a name="idm140091567692064"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-fields-table"></a>25.39.10 The INFORMATION_SCHEMA INNODB_FIELDS Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567683584"></a><p>
      The <a class="link" href="information-schema.html#innodb-fields-table" title="25.39.10 The INFORMATION_SCHEMA INNODB_FIELDS Table"><code class="literal">INNODB_FIELDS</code></a> table provides
      metadata about the key columns (fields) of
      <code class="literal">InnoDB</code> indexes.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-system-tables" title="15.14.3 InnoDB INFORMATION_SCHEMA Schema Object Tables">Section 15.14.3, “InnoDB INFORMATION_SCHEMA Schema Object Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-fields-table" title="25.39.10 The INFORMATION_SCHEMA INNODB_FIELDS Table"><code class="literal">INNODB_FIELDS</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">INDEX_ID</code>
        </p><p>
          An identifier for the index associated with this key field;
          the same value as <code class="literal">INNODB_INDEXES.INDEX_ID</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">NAME</code>
        </p><p>
          The name of the original column from the table; the same value
          as <code class="literal">INNODB_COLUMNS.NAME</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">POS</code>
        </p><p>
          The ordinal position of the key field within the index,
          starting from 0 and incrementing sequentially. When a column
          is dropped, the remaining columns are reordered so that the
          sequence has no gaps.
</p></li></ul>
</div>
<h4><a name="idm140091567669072"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_FIELDS WHERE INDEX_ID = 117\G</code></strong>
*************************** 1. row ***************************
INDEX_ID: 117
    NAME: col1
     POS: 0
</pre>
<h4><a name="idm140091567666592"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-foreign-table"></a>25.39.11 The INFORMATION_SCHEMA INNODB_FOREIGN Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567658048"></a><p>
      The <a class="link" href="information-schema.html#innodb-foreign-table" title="25.39.11 The INFORMATION_SCHEMA INNODB_FOREIGN Table"><code class="literal">INNODB_FOREIGN</code></a> table provides
      metadata about <code class="literal">InnoDB</code>
      <a class="link" href="glossary.html#glos_foreign_key" title="foreign key">foreign keys</a>.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-system-tables" title="15.14.3 InnoDB INFORMATION_SCHEMA Schema Object Tables">Section 15.14.3, “InnoDB INFORMATION_SCHEMA Schema Object Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-foreign-table" title="25.39.11 The INFORMATION_SCHEMA INNODB_FOREIGN Table"><code class="literal">INNODB_FOREIGN</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">ID</code>
        </p><p>
          The name (not a numeric value) of the foreign key index,
          preceded by the schema (database) name (for example,
          <code class="literal">test/products_fk</code>).
        </p></li><li class="listitem"><p>
          <code class="literal">FOR_NAME</code>
        </p><p>
          The name of the <a class="link" href="glossary.html#glos_child_table" title="child table">child
          table</a> in this foreign key relationship.
        </p></li><li class="listitem"><p>
          <code class="literal">REF_NAME</code>
        </p><p>
          The name of the <a class="link" href="glossary.html#glos_parent_table" title="parent table">parent
          table</a> in this foreign key relationship.
        </p></li><li class="listitem"><p>
          <code class="literal">N_COLS</code>
        </p><p>
          The number of columns in the foreign key index.
        </p></li><li class="listitem"><p>
          <code class="literal">TYPE</code>
        </p><p>
          A collection of bit flags with information about the foreign
          key column, ORed together. 0 = <code class="literal">ON DELETE/UPDATE
          RESTRICT</code>, 1 = <code class="literal">ON DELETE CASCADE</code>,
          2 = <code class="literal">ON DELETE SET NULL</code>, 4 = <code class="literal">ON
          UPDATE CASCADE</code>, 8 = <code class="literal">ON UPDATE SET
          NULL</code>, 16 = <code class="literal">ON DELETE NO ACTION</code>,
          32 = <code class="literal">ON UPDATE NO ACTION</code>.
</p></li></ul>
</div>
<h4><a name="idm140091567633008"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_FOREIGN\G</code></strong>
*************************** 1. row ***************************
      ID: test/fk1
FOR_NAME: test/child
REF_NAME: test/parent
  N_COLS: 1
    TYPE: 1
</pre>
<h4><a name="idm140091567630512"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-foreign-cols-table"></a>25.39.12 The INFORMATION_SCHEMA INNODB_FOREIGN_COLS Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567621920"></a><p>
      The <a class="link" href="information-schema.html#innodb-foreign-cols-table" title="25.39.12 The INFORMATION_SCHEMA INNODB_FOREIGN_COLS Table"><code class="literal">INNODB_FOREIGN_COLS</code></a> table
      provides status information about <code class="literal">InnoDB</code>
      foreign key columns.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-system-tables" title="15.14.3 InnoDB INFORMATION_SCHEMA Schema Object Tables">Section 15.14.3, “InnoDB INFORMATION_SCHEMA Schema Object Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-foreign-cols-table" title="25.39.12 The INFORMATION_SCHEMA INNODB_FOREIGN_COLS Table"><code class="literal">INNODB_FOREIGN_COLS</code></a> table has
      these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">ID</code>
        </p><p>
          The foreign key index associated with this index key field;
          the same value as <code class="literal">INNODB_FOREIGN.ID</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">FOR_COL_NAME</code>
        </p><p>
          The name of the associated column in the child table.
        </p></li><li class="listitem"><p>
          <code class="literal">REF_COL_NAME</code>
        </p><p>
          The name of the associated column in the parent table.
        </p></li><li class="listitem"><p>
          <code class="literal">POS</code>
        </p><p>
          The ordinal position of this key field within the foreign key
          index, starting from 0.
</p></li></ul>
</div>
<h4><a name="idm140091567606320"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_FOREIGN_COLS WHERE ID = 'test/fk1'\G</code></strong>
*************************** 1. row ***************************
          ID: test/fk1
FOR_COL_NAME: parent_id
REF_COL_NAME: id
         POS: 0
</pre>
<h4><a name="idm140091567603792"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-ft-being-deleted-table"></a>25.39.13 The INFORMATION_SCHEMA INNODB_FT_BEING_DELETED Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567595200"></a><p>
      The <a class="link" href="information-schema.html#innodb-ft-being-deleted-table" title="25.39.13 The INFORMATION_SCHEMA INNODB_FT_BEING_DELETED Table"><code class="literal">INNODB_FT_BEING_DELETED</code></a> table
      provides a snapshot of the
      <a class="link" href="information-schema.html#innodb-ft-deleted-table" title="25.39.16 The INFORMATION_SCHEMA INNODB_FT_DELETED Table"><code class="literal">INNODB_FT_DELETED</code></a> table; it is used
      only during an <a class="link" href="sql-syntax.html#optimize-table" title="13.7.3.4 OPTIMIZE TABLE Syntax"><code class="literal">OPTIMIZE TABLE</code></a>
      maintenance operation. When <a class="link" href="sql-syntax.html#optimize-table" title="13.7.3.4 OPTIMIZE TABLE Syntax"><code class="literal">OPTIMIZE
      TABLE</code></a> is run, the
      <a class="link" href="information-schema.html#innodb-ft-being-deleted-table" title="25.39.13 The INFORMATION_SCHEMA INNODB_FT_BEING_DELETED Table"><code class="literal">INNODB_FT_BEING_DELETED</code></a> table is
      emptied, and <code class="literal">DOC_ID</code> values are removed from the
      <a class="link" href="information-schema.html#innodb-ft-deleted-table" title="25.39.16 The INFORMATION_SCHEMA INNODB_FT_DELETED Table"><code class="literal">INNODB_FT_DELETED</code></a> table. Because the
      contents of <a class="link" href="information-schema.html#innodb-ft-being-deleted-table" title="25.39.13 The INFORMATION_SCHEMA INNODB_FT_BEING_DELETED Table"><code class="literal">INNODB_FT_BEING_DELETED</code></a>
      typically have a short lifetime, this table has limited utility
      for monitoring or debugging. For information about running
      <a class="link" href="sql-syntax.html#optimize-table" title="13.7.3.4 OPTIMIZE TABLE Syntax"><code class="literal">OPTIMIZE TABLE</code></a> on tables with
      <code class="literal">FULLTEXT</code> indexes, see
      <a class="xref" href="functions.html#fulltext-fine-tuning" title="12.9.6 Fine-Tuning MySQL Full-Text Search">Section 12.9.6, “Fine-Tuning MySQL Full-Text Search”</a>.
    </p><p>
      This table is empty initially. Before querying it, set the value
      of the <a class="link" href="innodb-storage-engine.html#sysvar_innodb_ft_aux_table"><code class="literal">innodb_ft_aux_table</code></a> system
      variable to the name (including the database name) of the table
      that contains the <code class="literal">FULLTEXT</code> index (for example,
      <code class="literal">test/articles</code>). The output appears similar to
      the example provided for the
      <a class="link" href="information-schema.html#innodb-ft-deleted-table" title="25.39.16 The INFORMATION_SCHEMA INNODB_FT_DELETED Table"><code class="literal">INNODB_FT_DELETED</code></a> table.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-fulltext_index-tables" title="15.14.4 InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables">Section 15.14.4, “InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-ft-being-deleted-table" title="25.39.13 The INFORMATION_SCHEMA INNODB_FT_BEING_DELETED Table"><code class="literal">INNODB_FT_BEING_DELETED</code></a> table has
      these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">DOC_ID</code>
        </p><p>
          The document ID of the row that is in the process of being
          deleted. This value might reflect the value of an ID column
          that you defined for the underlying table, or it can be a
          sequence value generated by <code class="literal">InnoDB</code> when the
          table contains no suitable column. This value is used when you
          perform text searches, to skip rows in the
          <a class="link" href="information-schema.html#innodb-ft-index-table-table" title="25.39.18 The INFORMATION_SCHEMA INNODB_FT_INDEX_TABLE Table"><code class="literal">INNODB_FT_INDEX_TABLE</code></a> table
          before data for deleted rows is physically removed from the
          <code class="literal">FULLTEXT</code> index by an
          <a class="link" href="sql-syntax.html#optimize-table" title="13.7.3.4 OPTIMIZE TABLE Syntax"><code class="literal">OPTIMIZE TABLE</code></a> statement. For
          more information, see <a class="xref" href="functions.html#fulltext-optimize" title="Optimizing InnoDB Full-Text Indexes">Optimizing InnoDB Full-Text Indexes</a>.
</p></li></ul>
</div>
<h4><a name="idm140091567566224"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
        </p></li><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          For more information about <code class="literal">InnoDB</code>
          <code class="literal">FULLTEXT</code> search, see
          <a class="xref" href="innodb-storage-engine.html#innodb-fulltext-index" title="15.6.2.4 InnoDB FULLTEXT Indexes">Section 15.6.2.4, “InnoDB FULLTEXT Indexes”</a>, and
          <a class="xref" href="functions.html#fulltext-search" title="12.9 Full-Text Search Functions">Section 12.9, “Full-Text Search Functions”</a>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-ft-config-table"></a>25.39.14 The INFORMATION_SCHEMA INNODB_FT_CONFIG Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567554112"></a><p>
      The <a class="link" href="information-schema.html#innodb-ft-config-table" title="25.39.14 The INFORMATION_SCHEMA INNODB_FT_CONFIG Table"><code class="literal">INNODB_FT_CONFIG</code></a> table provides
      metadata about the <code class="literal">FULLTEXT</code> index and
      associated processing for an <code class="literal">InnoDB</code> table.
    </p><p>
      This table is empty initially. Before querying it, set the value
      of the <a class="link" href="innodb-storage-engine.html#sysvar_innodb_ft_aux_table"><code class="literal">innodb_ft_aux_table</code></a> system
      variable to the name (including the database name) of the table
      that contains the <code class="literal">FULLTEXT</code> index (for example,
      <code class="literal">test/articles</code>).
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-fulltext_index-tables" title="15.14.4 InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables">Section 15.14.4, “InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-ft-config-table" title="25.39.14 The INFORMATION_SCHEMA INNODB_FT_CONFIG Table"><code class="literal">INNODB_FT_CONFIG</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">KEY</code>
        </p><p>
          The name designating an item of metadata for an
          <code class="literal">InnoDB</code> table containing a
          <code class="literal">FULLTEXT</code> index.
        </p><p>
          The values for this column might change, depending on the
          needs for performance tuning and debugging for
          <code class="literal">InnoDB</code> full-text processing. The key names
          and their meanings include:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              <code class="literal">optimize_checkpoint_limit</code>: The number
              of seconds after which an <a class="link" href="sql-syntax.html#optimize-table" title="13.7.3.4 OPTIMIZE TABLE Syntax"><code class="literal">OPTIMIZE
              TABLE</code></a> run stops.
            </p></li><li class="listitem"><p>
              <code class="literal">synced_doc_id</code>: The next
              <code class="literal">DOC_ID</code> to be issued.
            </p></li><li class="listitem"><p>
              <code class="literal">stopword_table_name</code>: The
              <em class="replaceable"><code>database/table</code></em> name for a
              user-defined stopword table. The <code class="literal">VALUE</code>
              column is empty if there is no user-defined stopword
              table.
            </p></li><li class="listitem"><p>
              <code class="literal">use_stopword</code>: Indicates whether a
              stopword table is used, which is defined when the
              <code class="literal">FULLTEXT</code> index is created.
</p></li></ul>
</div>
</li><li class="listitem"><p>
          <code class="literal">VALUE</code>
        </p><p>
          The value associated with the corresponding
          <code class="literal">KEY</code> column, reflecting some limit or
          current value for an aspect of a <code class="literal">FULLTEXT</code>
          index for an <code class="literal">InnoDB</code> table.
</p></li></ul>
</div>
<h4><a name="idm140091567523648"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_CONFIG;</code></strong>
+---------------------------+-------------------+
| KEY                       | VALUE             |
+---------------------------+-------------------+
| optimize_checkpoint_limit | 180               |
| synced_doc_id             | 0                 |
| stopword_table_name       | test/my_stopwords |
| use_stopword              | 1                 |
+---------------------------+-------------------+
</pre>
<h4><a name="idm140091567520896"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          This table is intended only for internal configuration. It is
          not intended for statistical information purposes.
        </p></li><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
        </p></li><li class="listitem"><p>
          For more information about <code class="literal">InnoDB</code>
          <code class="literal">FULLTEXT</code> search, see
          <a class="xref" href="innodb-storage-engine.html#innodb-fulltext-index" title="15.6.2.4 InnoDB FULLTEXT Indexes">Section 15.6.2.4, “InnoDB FULLTEXT Indexes”</a>, and
          <a class="xref" href="functions.html#fulltext-search" title="12.9 Full-Text Search Functions">Section 12.9, “Full-Text Search Functions”</a>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-ft-default-stopword-table"></a>25.39.15 The INFORMATION_SCHEMA INNODB_FT_DEFAULT_STOPWORD Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567507872"></a><p>
      The <a class="link" href="information-schema.html#innodb-ft-default-stopword-table" title="25.39.15 The INFORMATION_SCHEMA INNODB_FT_DEFAULT_STOPWORD Table"><code class="literal">INNODB_FT_DEFAULT_STOPWORD</code></a> table
      holds a list of <a class="link" href="glossary.html#glos_stopword" title="stopword">stopwords</a>
      that are used by default when creating a
      <code class="literal">FULLTEXT</code> index on <code class="literal">InnoDB</code>
      tables. For information about the default
      <code class="literal">InnoDB</code> stopword list and how to define your own
      stopword lists, see <a class="xref" href="functions.html#fulltext-stopwords" title="12.9.4 Full-Text Stopwords">Section 12.9.4, “Full-Text Stopwords”</a>.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-fulltext_index-tables" title="15.14.4 InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables">Section 15.14.4, “InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-ft-default-stopword-table" title="25.39.15 The INFORMATION_SCHEMA INNODB_FT_DEFAULT_STOPWORD Table"><code class="literal">INNODB_FT_DEFAULT_STOPWORD</code></a> table
      has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">value</code>
        </p><p>
          A word that is used by default as a stopword for
          <code class="literal">FULLTEXT</code> indexes on
          <code class="literal">InnoDB</code> tables. This is not used if you
          override the default stopword processing with either the
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_ft_server_stopword_table"><code class="literal">innodb_ft_server_stopword_table</code></a>
          or the
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_ft_user_stopword_table"><code class="literal">innodb_ft_user_stopword_table</code></a>
          system variable.
</p></li></ul>
</div>
<h4><a name="idm140091567491504"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_DEFAULT_STOPWORD;</code></strong>
+-------+
| value |
+-------+
| a     |
| about |
| an    |
| are   |
| as    |
| at    |
| be    |
| by    |
| com   |
| de    |
| en    |
| for   |
| from  |
| how   |
| i     |
| in    |
| is    |
| it    |
| la    |
| of    |
| on    |
| or    |
| that  |
| the   |
| this  |
| to    |
| was   |
| what  |
| when  |
| where |
| who   |
| will  |
| with  |
| und   |
| the   |
| www   |
+-------+
36 rows in set (0.00 sec)
</pre>
<h4><a name="idm140091567488704"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
        </p></li><li class="listitem"><p>
          For more information about <code class="literal">InnoDB</code>
          <code class="literal">FULLTEXT</code> search, see
          <a class="xref" href="innodb-storage-engine.html#innodb-fulltext-index" title="15.6.2.4 InnoDB FULLTEXT Indexes">Section 15.6.2.4, “InnoDB FULLTEXT Indexes”</a>, and
          <a class="xref" href="functions.html#fulltext-search" title="12.9 Full-Text Search Functions">Section 12.9, “Full-Text Search Functions”</a>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-ft-deleted-table"></a>25.39.16 The INFORMATION_SCHEMA INNODB_FT_DELETED Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567476720"></a><p>
      The <a class="link" href="information-schema.html#innodb-ft-deleted-table" title="25.39.16 The INFORMATION_SCHEMA INNODB_FT_DELETED Table"><code class="literal">INNODB_FT_DELETED</code></a> table stores
      rows that are deleted from the <code class="literal">FULLTEXT</code> index
      for an <code class="literal">InnoDB</code> table. To avoid expensive index
      reorganization during DML operations for an
      <code class="literal">InnoDB</code> <code class="literal">FULLTEXT</code> index, the
      information about newly deleted words is stored separately,
      filtered out of search results when you do a text search, and
      removed from the main search index only when you issue an
      <a class="link" href="sql-syntax.html#optimize-table" title="13.7.3.4 OPTIMIZE TABLE Syntax"><code class="literal">OPTIMIZE TABLE</code></a> statement for the
      <code class="literal">InnoDB</code> table. For more information, see
      <a class="xref" href="functions.html#fulltext-optimize" title="Optimizing InnoDB Full-Text Indexes">Optimizing InnoDB Full-Text Indexes</a>.
    </p><p>
      This table is empty initially. Before querying it, set the value
      of the <a class="link" href="innodb-storage-engine.html#sysvar_innodb_ft_aux_table"><code class="literal">innodb_ft_aux_table</code></a> system
      variable to the name (including the database name) of the table
      that contains the <code class="literal">FULLTEXT</code> index (for example,
      <code class="literal">test/articles</code>).
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-fulltext_index-tables" title="15.14.4 InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables">Section 15.14.4, “InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-ft-deleted-table" title="25.39.16 The INFORMATION_SCHEMA INNODB_FT_DELETED Table"><code class="literal">INNODB_FT_DELETED</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">DOC_ID</code>
        </p><p>
          The document ID of the newly deleted row. This value might
          reflect the value of an ID column that you defined for the
          underlying table, or it can be a sequence value generated by
          <code class="literal">InnoDB</code> when the table contains no suitable
          column. This value is used when you perform text searches, to
          skip rows in the
          <a class="link" href="information-schema.html#innodb-ft-index-table-table" title="25.39.18 The INFORMATION_SCHEMA INNODB_FT_INDEX_TABLE Table"><code class="literal">INNODB_FT_INDEX_TABLE</code></a> table
          before data for deleted rows is physically removed from the
          <code class="literal">FULLTEXT</code> index by an
          <a class="link" href="sql-syntax.html#optimize-table" title="13.7.3.4 OPTIMIZE TABLE Syntax"><code class="literal">OPTIMIZE TABLE</code></a> statement. For
          more information, see <a class="xref" href="functions.html#fulltext-optimize" title="Optimizing InnoDB Full-Text Indexes">Optimizing InnoDB Full-Text Indexes</a>.
</p></li></ul>
</div>
<h4><a name="idm140091567454320"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_DELETED;</code></strong>
+--------+
| DOC_ID |
+--------+
|      6 |
|      7 |
|      8 |
+--------+
</pre>
<h4><a name="idm140091567451888"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
        </p></li><li class="listitem"><p>
          For more information about <code class="literal">InnoDB</code>
          <code class="literal">FULLTEXT</code> search, see
          <a class="xref" href="innodb-storage-engine.html#innodb-fulltext-index" title="15.6.2.4 InnoDB FULLTEXT Indexes">Section 15.6.2.4, “InnoDB FULLTEXT Indexes”</a>, and
          <a class="xref" href="functions.html#fulltext-search" title="12.9 Full-Text Search Functions">Section 12.9, “Full-Text Search Functions”</a>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-ft-index-cache-table"></a>25.39.17 The INFORMATION_SCHEMA INNODB_FT_INDEX_CACHE Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567439792"></a><p>
      The <a class="link" href="information-schema.html#innodb-ft-index-cache-table" title="25.39.17 The INFORMATION_SCHEMA INNODB_FT_INDEX_CACHE Table"><code class="literal">INNODB_FT_INDEX_CACHE</code></a> table
      provides token information about newly inserted rows in a
      <code class="literal">FULLTEXT</code> index. To avoid expensive index
      reorganization during DML operations, the information about newly
      indexed words is stored separately, and combined with the main
      search index only when <a class="link" href="sql-syntax.html#optimize-table" title="13.7.3.4 OPTIMIZE TABLE Syntax"><code class="literal">OPTIMIZE
      TABLE</code></a> is run, when the server is shut down, or when the
      cache size exceeds a limit defined by the
      <a class="link" href="innodb-storage-engine.html#sysvar_innodb_ft_cache_size"><code class="literal">innodb_ft_cache_size</code></a> or
      <a class="link" href="innodb-storage-engine.html#sysvar_innodb_ft_total_cache_size"><code class="literal">innodb_ft_total_cache_size</code></a> system
      variable.
    </p><p>
      This table is empty initially. Before querying it, set the value
      of the <a class="link" href="innodb-storage-engine.html#sysvar_innodb_ft_aux_table"><code class="literal">innodb_ft_aux_table</code></a> system
      variable to the name (including the database name) of the table
      that contains the <code class="literal">FULLTEXT</code> index (for example,
      <code class="literal">test/articles</code>).
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-fulltext_index-tables" title="15.14.4 InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables">Section 15.14.4, “InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-ft-index-cache-table" title="25.39.17 The INFORMATION_SCHEMA INNODB_FT_INDEX_CACHE Table"><code class="literal">INNODB_FT_INDEX_CACHE</code></a> table has
      these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">WORD</code>
        </p><p>
          A word extracted from the text of a newly inserted row.
        </p></li><li class="listitem"><p>
          <code class="literal">FIRST_DOC_ID</code>
        </p><p>
          The first document ID in which this word appears in the
          <code class="literal">FULLTEXT</code> index.
        </p></li><li class="listitem"><p>
          <code class="literal">LAST_DOC_ID</code>
        </p><p>
          The last document ID in which this word appears in the
          <code class="literal">FULLTEXT</code> index.
        </p></li><li class="listitem"><p>
          <code class="literal">DOC_COUNT</code>
        </p><p>
          The number of rows in which this word appears in the
          <code class="literal">FULLTEXT</code> index. The same word can occur
          several times within the cache table, once for each
          combination of <code class="literal">DOC_ID</code> and
          <code class="literal">POSITION</code> values.
        </p></li><li class="listitem"><p>
          <code class="literal">DOC_ID</code>
        </p><p>
          The document ID of the newly inserted row. This value might
          reflect the value of an ID column that you defined for the
          underlying table, or it can be a sequence value generated by
          <code class="literal">InnoDB</code> when the table contains no suitable
          column.
        </p></li><li class="listitem"><p>
          <code class="literal">POSITION</code>
        </p><p>
          The position of this particular instance of the word within
          the relevant document identified by the
          <code class="literal">DOC_ID</code> value. The value does not represent
          an absolute position; it is an offset added to the
          <code class="literal">POSITION</code> of the previous instance of that
          word.
</p></li></ul>
</div>
<h4><a name="idm140091567407312"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          This table is empty initially. Before querying it, set the
          value of the
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_ft_aux_table"><code class="literal">innodb_ft_aux_table</code></a> system
          variable to the name (including the database name) of the
          table that contains the <code class="literal">FULLTEXT</code> index (for
          example <code class="literal">test/articles</code>). The following
          example demonstrates how to use the
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_ft_aux_table"><code class="literal">innodb_ft_aux_table</code></a> system
          variable to show information about a
          <code class="literal">FULLTEXT</code> index for a specified table.
        </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>USE test;</code></strong>

mysql&gt; <strong class="userinput"><code>CREATE TABLE articles (</code></strong>
         <strong class="userinput"><code>id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,</code></strong>
         <strong class="userinput"><code>title VARCHAR(200),</code></strong>
         <strong class="userinput"><code>body TEXT,</code></strong>
         <strong class="userinput"><code>FULLTEXT (title,body)</code></strong>
       <strong class="userinput"><code>) ENGINE=InnoDB;</code></strong>

mysql&gt; <strong class="userinput"><code>INSERT INTO articles (title,body) VALUES</code></strong>
       <strong class="userinput"><code>('MySQL Tutorial','DBMS stands for DataBase ...'),</code></strong>
       <strong class="userinput"><code>('How To Use MySQL Well','After you went through a ...'),</code></strong>
       <strong class="userinput"><code>('Optimizing MySQL','In this tutorial we will show ...'),</code></strong>
       <strong class="userinput"><code>('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),</code></strong>
       <strong class="userinput"><code>('MySQL vs. YourSQL','In the following database comparison ...'),</code></strong>
       <strong class="userinput"><code>('MySQL Security','When configured properly, MySQL ...');</code></strong>

mysql&gt; <strong class="userinput"><code>SET GLOBAL innodb_ft_aux_table = 'test/articles';</code></strong>

mysql&gt; <strong class="userinput"><code>SELECT WORD, DOC_COUNT, DOC_ID, POSITION</code></strong>
       <strong class="userinput"><code>FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE LIMIT 5;</code></strong>
+------------+-----------+--------+----------+
| WORD       | DOC_COUNT | DOC_ID | POSITION |
+------------+-----------+--------+----------+
| 1001       |         1 |      4 |        0 |
| after      |         1 |      2 |       22 |
| comparison |         1 |      5 |       44 |
| configured |         1 |      6 |       20 |
| database   |         2 |      1 |       31 |
+------------+-----------+--------+----------+
</pre></li><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
        </p></li><li class="listitem"><p>
          For more information about <code class="literal">InnoDB</code>
          <code class="literal">FULLTEXT</code> search, see
          <a class="xref" href="innodb-storage-engine.html#innodb-fulltext-index" title="15.6.2.4 InnoDB FULLTEXT Indexes">Section 15.6.2.4, “InnoDB FULLTEXT Indexes”</a>, and
          <a class="xref" href="functions.html#fulltext-search" title="12.9 Full-Text Search Functions">Section 12.9, “Full-Text Search Functions”</a>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-ft-index-table-table"></a>25.39.18 The INFORMATION_SCHEMA INNODB_FT_INDEX_TABLE Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567375776"></a><p>
      The <a class="link" href="information-schema.html#innodb-ft-index-table-table" title="25.39.18 The INFORMATION_SCHEMA INNODB_FT_INDEX_TABLE Table"><code class="literal">INNODB_FT_INDEX_TABLE</code></a> table
      provides information about the inverted index used to process text
      searches against the <code class="literal">FULLTEXT</code> index of an
      <code class="literal">InnoDB</code> table.
    </p><p>
      This table is empty initially. Before querying it, set the value
      of the <a class="link" href="innodb-storage-engine.html#sysvar_innodb_ft_aux_table"><code class="literal">innodb_ft_aux_table</code></a> system
      variable to the name (including the database name) of the table
      that contains the <code class="literal">FULLTEXT</code> index (for example,
      <code class="literal">test/articles</code>).
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-fulltext_index-tables" title="15.14.4 InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables">Section 15.14.4, “InnoDB INFORMATION_SCHEMA FULLTEXT Index Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-ft-index-table-table" title="25.39.18 The INFORMATION_SCHEMA INNODB_FT_INDEX_TABLE Table"><code class="literal">INNODB_FT_INDEX_TABLE</code></a> table has
      these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">WORD</code>
        </p><p>
          A word extracted from the text of the columns that are part of
          a <code class="literal">FULLTEXT</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">FIRST_DOC_ID</code>
        </p><p>
          The first document ID in which this word appears in the
          <code class="literal">FULLTEXT</code> index.
        </p></li><li class="listitem"><p>
          <code class="literal">LAST_DOC_ID</code>
        </p><p>
          The last document ID in which this word appears in the
          <code class="literal">FULLTEXT</code> index.
        </p></li><li class="listitem"><p>
          <code class="literal">DOC_COUNT</code>
        </p><p>
          The number of rows in which this word appears in the
          <code class="literal">FULLTEXT</code> index. The same word can occur
          several times within the cache table, once for each
          combination of <code class="literal">DOC_ID</code> and
          <code class="literal">POSITION</code> values.
        </p></li><li class="listitem"><p>
          <code class="literal">DOC_ID</code>
        </p><p>
          The document ID of the row containing the word. This value
          might reflect the value of an ID column that you defined for
          the underlying table, or it can be a sequence value generated
          by <code class="literal">InnoDB</code> when the table contains no
          suitable column.
        </p></li><li class="listitem"><p>
          <code class="literal">POSITION</code>
        </p><p>
          The position of this particular instance of the word within
          the relevant document identified by the
          <code class="literal">DOC_ID</code> value.
</p></li></ul>
</div>
<h4><a name="idm140091567346768"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          This table is empty initially. Before querying it, set the
          value of the
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_ft_aux_table"><code class="literal">innodb_ft_aux_table</code></a> system
          variable to the name (including the database name) of the
          table that contains the <code class="literal">FULLTEXT</code> index (for
          example, <code class="literal">test/articles</code>). The following
          example demonstrates how to use the
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_ft_aux_table"><code class="literal">innodb_ft_aux_table</code></a> system
          variable to show information about a
          <code class="literal">FULLTEXT</code> index for a specified table.
          Before information for newly inserted rows appears in
          <code class="literal">INNODB_FT_INDEX_TABLE</code>, the
          <code class="literal">FULLTEXT</code> index cache must be flushed to
          disk. This is accomplished by running an
          <a class="link" href="sql-syntax.html#optimize-table" title="13.7.3.4 OPTIMIZE TABLE Syntax"><code class="literal">OPTIMIZE TABLE</code></a> operation on the
          indexed table with the
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_optimize_fulltext_only"><code class="literal">innodb_optimize_fulltext_only</code></a>
          system variable enabled. (The example disables that variable
          again at the end because it is intended to be enabled only
          temporarily.)
        </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>USE test;</code></strong>

mysql&gt; <strong class="userinput"><code>CREATE TABLE articles (</code></strong>
         <strong class="userinput"><code>id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,</code></strong>
         <strong class="userinput"><code>title VARCHAR(200),</code></strong>
         <strong class="userinput"><code>body TEXT,</code></strong>
         <strong class="userinput"><code>FULLTEXT (title,body)</code></strong>
       <strong class="userinput"><code>) ENGINE=InnoDB;</code></strong>

mysql&gt; <strong class="userinput"><code>INSERT INTO articles (title,body) VALUES</code></strong>
       <strong class="userinput"><code>('MySQL Tutorial','DBMS stands for DataBase ...'),</code></strong>
       <strong class="userinput"><code>('How To Use MySQL Well','After you went through a ...'),</code></strong>
       <strong class="userinput"><code>('Optimizing MySQL','In this tutorial we will show ...'),</code></strong>
       <strong class="userinput"><code>('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),</code></strong>
       <strong class="userinput"><code>('MySQL vs. YourSQL','In the following database comparison ...'),</code></strong>
       <strong class="userinput"><code>('MySQL Security','When configured properly, MySQL ...');</code></strong>

mysql&gt; <strong class="userinput"><code>SET GLOBAL innodb_optimize_fulltext_only=ON;</code></strong>

mysql&gt; <strong class="userinput"><code>OPTIMIZE TABLE articles;</code></strong>
+---------------+----------+----------+----------+
| Table         | Op       | Msg_type | Msg_text |
+---------------+----------+----------+----------+
| test.articles | optimize | status   | OK       |
+---------------+----------+----------+----------+

mysql&gt; <strong class="userinput"><code>SET GLOBAL innodb_ft_aux_table = 'test/articles';</code></strong>

mysql&gt; <strong class="userinput"><code>SELECT WORD, DOC_COUNT, DOC_ID, POSITION</code></strong>
       <strong class="userinput"><code>FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE LIMIT 5;</code></strong>
+------------+-----------+--------+----------+
| WORD       | DOC_COUNT | DOC_ID | POSITION |
+------------+-----------+--------+----------+
| 1001       |         1 |      4 |        0 |
| after      |         1 |      2 |       22 |
| comparison |         1 |      5 |       44 |
| configured |         1 |      6 |       20 |
| database   |         2 |      1 |       31 |
+------------+-----------+--------+----------+

mysql&gt; <strong class="userinput"><code>SET GLOBAL innodb_optimize_fulltext_only=OFF;</code></strong>
</pre></li><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
        </p></li><li class="listitem"><p>
          For more information about <code class="literal">InnoDB</code>
          <code class="literal">FULLTEXT</code> search, see
          <a class="xref" href="innodb-storage-engine.html#innodb-fulltext-index" title="15.6.2.4 InnoDB FULLTEXT Indexes">Section 15.6.2.4, “InnoDB FULLTEXT Indexes”</a>, and
          <a class="xref" href="functions.html#fulltext-search" title="12.9 Full-Text Search Functions">Section 12.9, “Full-Text Search Functions”</a>.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-indexes-table"></a>25.39.19 The INFORMATION_SCHEMA INNODB_INDEXES Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567307808"></a><p>
      The <a class="link" href="information-schema.html#innodb-indexes-table" title="25.39.19 The INFORMATION_SCHEMA INNODB_INDEXES Table"><code class="literal">INNODB_INDEXES</code></a> table provides
      metadata about <code class="literal">InnoDB</code> indexes.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-system-tables" title="15.14.3 InnoDB INFORMATION_SCHEMA Schema Object Tables">Section 15.14.3, “InnoDB INFORMATION_SCHEMA Schema Object Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-indexes-table" title="25.39.19 The INFORMATION_SCHEMA INNODB_INDEXES Table"><code class="literal">INNODB_INDEXES</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">INDEX_ID</code>
        </p><p>
          An identifier for the index. Index identifiers are unique
          across all the databases in an instance.
        </p></li><li class="listitem"><p>
          <code class="literal">NAME</code>
        </p><p>
          The name of the index. Most indexes created implicitly by
          <code class="literal">InnoDB</code> have consistent names but the index
          names are not necessarily unique. Examples:
          <code class="literal">PRIMARY</code> for a primary key index,
          <code class="literal">GEN_CLUST_INDEX</code> for the index representing
          a primary key when one is not specified, and
          <code class="literal">ID_IND</code>, <code class="literal">FOR_IND</code>, and
          <code class="literal">REF_IND</code> for foreign key constraints.
        </p></li><li class="listitem"><p>
          <code class="literal">TABLE_ID</code>
        </p><p>
          An identifier representing the table associated with the
          index; the same value as
          <code class="literal">INNODB_TABLES.TABLE_ID</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TYPE</code>
        </p><p>
          A numeric value derived from bit-level information that
          identifies the index type. 0 = nonunique secondary index; 1 =
          automatically generated clustered index
          (<code class="literal">GEN_CLUST_INDEX</code>); 2 = unique nonclustered
          index; 3 = clustered index; 32 = full-text index; 64 = spatial
          index; 128 = secondary index on a
          <a class="link" href="glossary.html#glos_virtual_generated_column" title="virtual generated column">virtual
          generated column</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">N_FIELDS</code>
        </p><p>
          The number of columns in the index key. For
          <code class="literal">GEN_CLUST_INDEX</code> indexes, this value is 0
          because the index is created using an artificial value rather
          than a real table column.
        </p></li><li class="listitem"><p>
          <code class="literal">PAGE_NO</code>
        </p><p>
          The root page number of the index B-tree. For full-text
          indexes, the <code class="literal">PAGE_NO</code> column is unused and
          set to -1 (<code class="literal">FIL_NULL</code>) because the full-text
          index is laid out in several B-trees (auxiliary tables).
        </p></li><li class="listitem"><p>
          <code class="literal">SPACE</code>
        </p><p>
          An identifier for the tablespace where the index resides. 0
          means the <code class="literal">InnoDB</code>
          <a class="link" href="glossary.html#glos_system_tablespace" title="system tablespace">system
          tablespace</a>. Any other number represents a table created
          with a separate <code class="literal">.ibd</code> file in
          <a class="link" href="glossary.html#glos_file_per_table" title="file-per-table">file-per-table</a>
          mode. This identifier stays the same after a
          <a class="link" href="sql-syntax.html#truncate-table" title="13.1.37 TRUNCATE TABLE Syntax"><code class="literal">TRUNCATE TABLE</code></a> statement.
          Because all indexes for a table reside in the same tablespace
          as the table, this value is not necessarily unique.
        </p></li><li class="listitem"><p>
          <code class="literal">MERGE_THRESHOLD</code>
        </p><p>
          The merge threshold value for index pages. If the amount of
          data in an index page falls below the
          <a class="link" href="innodb-storage-engine.html#index-page-merge-threshold" title="15.8.11 Configuring the Merge Threshold for Index Pages"><code class="literal">MERGE_THRESHOLD</code></a>
          value when a row is deleted or when a row is shortened by an
          update operation, <code class="literal">InnoDB</code> attempts to merge
          the index page with the neighboring index page. The default
          threshold value is 50%. For more information, see
          <a class="xref" href="innodb-storage-engine.html#index-page-merge-threshold" title="15.8.11 Configuring the Merge Threshold for Index Pages">Section 15.8.11, “Configuring the Merge Threshold for Index Pages”</a>.
</p></li></ul>
</div>
<h4><a name="idm140091567268096"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_INDEXES WHERE TABLE_ID = 34\G</code></strong>
*************************** 1. row ***************************
       INDEX_ID: 39
           NAME: GEN_CLUST_INDEX
       TABLE_ID: 34
           TYPE: 1
       N_FIELDS: 0
        PAGE_NO: 3
          SPACE: 23
MERGE_THRESHOLD: 50
*************************** 2. row ***************************
       INDEX_ID: 40
           NAME: i1
       TABLE_ID: 34
           TYPE: 0
       N_FIELDS: 1
        PAGE_NO: 4
          SPACE: 23
MERGE_THRESHOLD: 50
</pre>
<h4><a name="idm140091567265280"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-locks-table"></a>25.39.20 The INFORMATION_SCHEMA INNODB_LOCKS Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567255872"></a><p>
      The <a class="link" href="information-schema.html#innodb-locks-table" title="25.39.20 The INFORMATION_SCHEMA INNODB_LOCKS Table"><code class="literal">INNODB_LOCKS</code></a> table provides
      information about each lock that an <code class="literal">InnoDB</code>
      transaction has requested but not yet acquired, and each lock that
      a transaction holds that is blocking another transaction.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        This table is deprecated and is removed as of MySQL 8.0.1. Use
        the Performance Schema <a class="link" href="performance-schema.html#data-locks-table" title="26.12.12.1 The data_locks Table"><code class="literal">data_locks</code></a>
        table instead. See <a class="xref" href="performance-schema.html#data-locks-table" title="26.12.12.1 The data_locks Table">Section 26.12.12.1, “The data_locks Table”</a>.
      </p><p>
        Differences between <a class="link" href="information-schema.html#innodb-locks-table" title="25.39.20 The INFORMATION_SCHEMA INNODB_LOCKS Table"><code class="literal">INNODB_LOCKS</code></a>
        and <a class="link" href="performance-schema.html#data-locks-table" title="26.12.12.1 The data_locks Table"><code class="literal">data_locks</code></a>:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
            If a transaction holds a lock,
            <a class="link" href="information-schema.html#innodb-locks-table" title="25.39.20 The INFORMATION_SCHEMA INNODB_LOCKS Table"><code class="literal">INNODB_LOCKS</code></a> displays the lock
            only if another transaction is waiting for it.
            <a class="link" href="performance-schema.html#data-locks-table" title="26.12.12.1 The data_locks Table"><code class="literal">data_locks</code></a> displays the lock
            regardless of whether any transaction is waiting for it.
          </p></li><li class="listitem"><p>
            The <a class="link" href="performance-schema.html#data-locks-table" title="26.12.12.1 The data_locks Table"><code class="literal">data_locks</code></a> table has no
            columns corresponding to <code class="literal">LOCK_SPACE</code>,
            <code class="literal">LOCK_PAGE</code>, or
            <code class="literal">LOCK_REC</code>.
          </p></li><li class="listitem"><p>
            The <a class="link" href="information-schema.html#innodb-locks-table" title="25.39.20 The INFORMATION_SCHEMA INNODB_LOCKS Table"><code class="literal">INNODB_LOCKS</code></a> table requires
            the global <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a> privilege.
            The <a class="link" href="performance-schema.html#data-locks-table" title="26.12.12.1 The data_locks Table"><code class="literal">data_locks</code></a> table requires
            the usual Performance Schema privilege of
            <a class="link" href="security.html#priv_select"><code class="literal">SELECT</code></a> on the table to be
            selected from.
</p></li></ul>
</div>

</div>
<p>
      The following table shows the mapping from
      <a class="link" href="information-schema.html#innodb-locks-table" title="25.39.20 The INFORMATION_SCHEMA INNODB_LOCKS Table"><code class="literal">INNODB_LOCKS</code></a> columns to
      <a class="link" href="performance-schema.html#data-locks-table" title="26.12.12.1 The data_locks Table"><code class="literal">data_locks</code></a> columns. Use this
      information to migrate applications from one table to the other.
</p>
<div class="table">
<a name="innodb-information-schema-innodb-locks-columns"></a><p class="title"><b>Table 25.4 Mapping from INNODB_LOCKS to data_locks Columns</b></p>
<div class="table-contents">
<table summary="Mapping from INNODB_LOCKS to data_locks columns."><col width="50%"><col width="50%"><thead><tr>
          <th scope="col">INNODB_LOCKS Column</th>
          <th scope="col">data_locks Column</th>
        </tr></thead><tbody><tr>
          <td scope="row"><code class="literal">LOCK_ID</code></td>
          <td><code class="literal">ENGINE_LOCK_ID</code></td>
        </tr><tr>
          <td scope="row"><code class="literal">LOCK_TRX_ID</code></td>
          <td><code class="literal">ENGINE_TRANSACTION_ID</code></td>
        </tr><tr>
          <td scope="row"><code class="literal">LOCK_MODE</code></td>
          <td><code class="literal">LOCK_MODE</code></td>
        </tr><tr>
          <td scope="row"><code class="literal">LOCK_TYPE</code></td>
          <td><code class="literal">LOCK_TYPE</code></td>
        </tr><tr>
          <td scope="row"><code class="literal">LOCK_TABLE</code> (combined schema/table names)</td>
          <td><code class="literal">OBJECT_SCHEMA</code> (schema name),
            <code class="literal">OBJECT_NAME</code> (table name)</td>
        </tr><tr>
          <td scope="row"><code class="literal">LOCK_INDEX</code></td>
          <td><code class="literal">INDEX_NAME</code></td>
        </tr><tr>
          <td scope="row"><code class="literal">LOCK_SPACE</code></td>
          <td>None</td>
        </tr><tr>
          <td scope="row"><code class="literal">LOCK_PAGE</code></td>
          <td>None</td>
        </tr><tr>
          <td scope="row"><code class="literal">LOCK_REC</code></td>
          <td>None</td>
        </tr><tr>
          <td scope="row"><code class="literal">LOCK_DATA</code></td>
          <td><code class="literal">LOCK_DATA</code></td>
</tr></tbody></table>
</div>

</div>
<br class="table-break">
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-lock-waits-table"></a>25.39.21 The INFORMATION_SCHEMA INNODB_LOCK_WAITS Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567188416"></a><p>
      The <a class="link" href="information-schema.html#innodb-lock-waits-table" title="25.39.21 The INFORMATION_SCHEMA INNODB_LOCK_WAITS Table"><code class="literal">INNODB_LOCK_WAITS</code></a> table contains
      one or more rows for each blocked <code class="literal">InnoDB</code>
      transaction, indicating the lock it has requested and any locks
      that are blocking that request.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        This table is deprecated and is removed as of MySQL 8.0.1. Use
        the Performance Schema
        <a class="link" href="performance-schema.html#data-lock-waits-table" title="26.12.12.2 The data_lock_waits Table"><code class="literal">data_lock_waits</code></a> table instead. See
        <a class="xref" href="performance-schema.html#data-lock-waits-table" title="26.12.12.2 The data_lock_waits Table">Section 26.12.12.2, “The data_lock_waits Table”</a>.
      </p><p>
        The tables differ in the privileges required: The
        <a class="link" href="information-schema.html#innodb-lock-waits-table" title="25.39.21 The INFORMATION_SCHEMA INNODB_LOCK_WAITS Table"><code class="literal">INNODB_LOCK_WAITS</code></a> table requires
        the global <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a> privilege. The
        <a class="link" href="performance-schema.html#data-lock-waits-table" title="26.12.12.2 The data_lock_waits Table"><code class="literal">data_lock_waits</code></a> table requires the
        usual Performance Schema privilege of
        <a class="link" href="security.html#priv_select"><code class="literal">SELECT</code></a> on the table to be
        selected from.
</p>
</div>
<p>
      The following table shows the mapping from
      <a class="link" href="information-schema.html#innodb-lock-waits-table" title="25.39.21 The INFORMATION_SCHEMA INNODB_LOCK_WAITS Table"><code class="literal">INNODB_LOCK_WAITS</code></a> columns to
      <a class="link" href="performance-schema.html#data-lock-waits-table" title="26.12.12.2 The data_lock_waits Table"><code class="literal">data_lock_waits</code></a> columns. Use this
      information to migrate applications from one table to the other.
</p>
<div class="table">
<a name="innodb-information-schema-innodb-lock-waits-columns"></a><p class="title"><b>Table 25.5 Mapping from INNODB_LOCK_WAITS to data_lock_waits Columns</b></p>
<div class="table-contents">
<table summary="Mapping from INNODB_LOCK_WAITS to data_lock_waits columns."><col width="50%"><col width="50%"><thead><tr>
          <th scope="col">INNODB_LOCK_WAITS Column</th>
          <th scope="col">data_lock_waits Column</th>
        </tr></thead><tbody><tr>
          <td scope="row"><code class="literal">REQUESTING_TRX_ID</code></td>
          <td><code class="literal">REQUESTING_ENGINE_TRANSACTION_ID</code></td>
        </tr><tr>
          <td scope="row"><code class="literal">REQUESTED_LOCK_ID</code></td>
          <td><code class="literal">REQUESTING_ENGINE_LOCK_ID</code></td>
        </tr><tr>
          <td scope="row"><code class="literal">BLOCKING_TRX_ID</code></td>
          <td><code class="literal">BLOCKING_ENGINE_TRANSACTION_ID</code></td>
        </tr><tr>
          <td scope="row"><code class="literal">BLOCKING_LOCK_ID</code></td>
          <td><code class="literal">BLOCKING_ENGINE_LOCK_ID</code></td>
</tr></tbody></table>
</div>

</div>
<br class="table-break">
</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-metrics-table"></a>25.39.22 The INFORMATION_SCHEMA INNODB_METRICS Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567152352"></a><p>
      The <a class="link" href="information-schema.html#innodb-metrics-table" title="25.39.22 The INFORMATION_SCHEMA INNODB_METRICS Table"><code class="literal">INNODB_METRICS</code></a> table provides a
      wide variety of <code class="literal">InnoDB</code> performance information,
      complementing the specific focus areas of the Performance Schema
      tables for <code class="literal">InnoDB</code>. With simple queries, you can
      check the overall health of the system. With more detailed
      queries, you can diagnose issues such as performance bottlenecks,
      resource shortages, and application issues.
    </p><p>
      Each monitor represents a point within the
      <code class="literal">InnoDB</code> source code that is instrumented to
      gather counter information. Each counter can be started, stopped,
      and reset. You can also perform these actions for a group of
      counters using their common module name.
    </p><p>
      By default, relatively little data is collected. To start, stop,
      and reset counters, set one of the system variables
      <a class="link" href="innodb-storage-engine.html#sysvar_innodb_monitor_enable"><code class="literal">innodb_monitor_enable</code></a>,
      <a class="link" href="innodb-storage-engine.html#sysvar_innodb_monitor_disable"><code class="literal">innodb_monitor_disable</code></a>,
      <a class="link" href="innodb-storage-engine.html#sysvar_innodb_monitor_reset"><code class="literal">innodb_monitor_reset</code></a>, or
      <a class="link" href="innodb-storage-engine.html#sysvar_innodb_monitor_reset_all"><code class="literal">innodb_monitor_reset_all</code></a>, using
      the name of the counter, the name of the module, a wildcard match
      for such a name using the <span class="quote">“<span class="quote">%</span>”</span> character, or the
      special keyword <code class="literal">all</code>.
    </p><p>
      For usage information, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-metrics-table" title="15.14.6 InnoDB INFORMATION_SCHEMA Metrics Table">Section 15.14.6, “InnoDB INFORMATION_SCHEMA Metrics Table”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-metrics-table" title="25.39.22 The INFORMATION_SCHEMA INNODB_METRICS Table"><code class="literal">INNODB_METRICS</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">NAME</code>
        </p><p>
          A unique name for the counter.
        </p></li><li class="listitem"><p>
          <code class="literal">SUBSYSTEM</code>
        </p><p>
          The aspect of <code class="literal">InnoDB</code> that the metric
          applies to.
        </p></li><li class="listitem"><p>
          <code class="literal">COUNT</code>
        </p><p>
          The value since the counter was enabled.
        </p></li><li class="listitem"><p>
          <code class="literal">MAX_COUNT</code>
        </p><p>
          The maximum value since the counter was enabled.
        </p></li><li class="listitem"><p>
          <code class="literal">MIN_COUNT</code>
        </p><p>
          The minimum value since the counter was enabled.
        </p></li><li class="listitem"><p>
          <code class="literal">AVG_COUNT</code>
        </p><p>
          The average value since the counter was enabled.
        </p></li><li class="listitem"><p>
          <code class="literal">COUNT_RESET</code>
        </p><p>
          The counter value since it was last reset. (The
          <code class="literal">_RESET</code> columns act like the lap counter on
          a stopwatch: you can measure the activity during some time
          interval, while the cumulative figures are still available in
          <code class="literal">COUNT</code>, <code class="literal">MAX_COUNT</code>, and so
          on.)
        </p></li><li class="listitem"><p>
          <code class="literal">MAX_COUNT_RESET</code>
        </p><p>
          The maximum counter value since it was last reset.
        </p></li><li class="listitem"><p>
          <code class="literal">MIN_COUNT_RESET</code>
        </p><p>
          The minimum counter value since it was last reset.
        </p></li><li class="listitem"><p>
          <code class="literal">AVG_COUNT_RESET</code>
        </p><p>
          The average counter value since it was last reset.
        </p></li><li class="listitem"><p>
          <code class="literal">TIME_ENABLED</code>
        </p><p>
          The timestamp of the last start.
        </p></li><li class="listitem"><p>
          <code class="literal">TIME_DISABLED</code>
        </p><p>
          The timestamp of the last stop.
        </p></li><li class="listitem"><p>
          <code class="literal">TIME_ELAPSED</code>
        </p><p>
          The elapsed time in seconds since the counter started.
        </p></li><li class="listitem"><p>
          <code class="literal">TIME_RESET</code>
        </p><p>
          The timestamp of the last reset.
        </p></li><li class="listitem"><p>
          <code class="literal">STATUS</code>
        </p><p>
          Whether the counter is still running
          (<code class="literal">enabled</code>) or stopped
          (<code class="literal">disabled</code>).
        </p></li><li class="listitem"><p>
          <code class="literal">TYPE</code>
        </p><p>
          Whether the item is a cumulative counter, or measures the
          current value of some resource.
        </p></li><li class="listitem"><p>
          <code class="literal">COMMENT</code>
        </p><p>
          The counter description.
</p></li></ul>
</div>
<h4><a name="idm140091567098896"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_METRICS WHERE NAME='dml_inserts'\G</code></strong>
*************************** 1. row ***************************
           NAME: dml_inserts
      SUBSYSTEM: dml
          COUNT: 3
      MAX_COUNT: 3
      MIN_COUNT: NULL
      AVG_COUNT: 0.046153846153846156
    COUNT_RESET: 3
MAX_COUNT_RESET: 3
MIN_COUNT_RESET: NULL
AVG_COUNT_RESET: NULL
   TIME_ENABLED: 2014-12-04 14:18:28
  TIME_DISABLED: NULL
   TIME_ELAPSED: 65
     TIME_RESET: NULL
         STATUS: enabled
           TYPE: status_counter
        COMMENT: Number of rows inserted
</pre>
<h4><a name="idm140091567096016"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
        </p></li><li class="listitem"><p>
          Transaction counter <code class="literal">COUNT</code> values may differ
          from the number of transaction events reported in Performance
          Schema <code class="literal">EVENTS_TRANSACTIONS_SUMMARY</code> tables.
          <code class="literal">InnoDB</code> counts only those transactions that
          it executes, whereas Performance Schema collects events for
          all non-aborted transactions initiated by the server,
          including empty transactions.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-session-temp-tablespaces-table"></a>25.39.23 The INFORMATION_SCHEMA INNODB_SESSION_TEMP_TABLESPACES Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567084176"></a><p>
      The <a class="link" href="information-schema.html#innodb-session-temp-tablespaces-table" title="25.39.23 The INFORMATION_SCHEMA INNODB_SESSION_TEMP_TABLESPACES Table"><code class="literal">INNODB_SESSION_TEMP_TABLESPACES</code></a>
      table provides metadata about session temporary tablespaces used
      for internal and user-created temporary tables. This table was
      added in MySQL 8.0.13.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-session-temp-tablespaces-table" title="25.39.23 The INFORMATION_SCHEMA INNODB_SESSION_TEMP_TABLESPACES Table"><code class="literal">INNODB_SESSION_TEMP_TABLESPACES</code></a>
      table has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">ID</code>
        </p><p>
          The process or session ID.
        </p></li><li class="listitem"><p>
          <code class="literal">SPACE</code>
        </p><p>
          The tablespace ID. A range of 400 thousand space IDs is
          reserved for session temporary tablespaces. Session temporary
          tablespaces are recreated each time the server is started.
          Space IDs are not persisted when the server is shut down and
          may be reused.
        </p></li><li class="listitem"><p>
          <code class="literal">PATH</code>
        </p><p>
          The tablespace data file path. A session temporary tablespace
          has an <code class="filename">ibt</code> file extension.
        </p></li><li class="listitem"><p>
          <code class="literal">SIZE</code>
        </p><p>
          The size of the tablespace, in bytes.
        </p></li><li class="listitem"><p>
          <code class="literal">STATE</code>
        </p><p>
          The state of the tablespace. <code class="literal">ACTIVE</code>
          indicates that the tablespace is currently used by a session.
          <code class="literal">INACTIVE</code> indicates that the tablespace is
          in the pool of available session temporary tablespaces.
        </p></li><li class="listitem"><p>
          <code class="literal">PURPOSE</code>
        </p><p>
          The purpose of the tablespace. <code class="literal">INTRINSIC</code>
          indicates that the tablespace is used for optimized internal
          temporary tables use by the optimizer.
          <code class="literal">SLAVE</code> indicates that the tablespace is
          allocated for storing user-created temporary tables on a
          replication slave. <code class="literal">USER</code> indicates that the
          tablespace is used for user-created temporary tables.
          <code class="literal">NONE</code> indicates that the tablespace is not
          in use.
</p></li></ul>
</div>
<h4><a name="idm140091567061440"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_SESSION_TEMP_TABLESPACES;</code></strong>
+----+------------+----------------------------+-------+----------+-----------+
| ID | SPACE      | PATH                       | SIZE  | STATE    | PURPOSE   |
+----+------------+----------------------------+-------+----------+-----------+
|  8 | 4294566162 | ./#innodb_temp/temp_10.ibt | 81920 | ACTIVE   | INTRINSIC |
|  8 | 4294566161 | ./#innodb_temp/temp_9.ibt  | 98304 | ACTIVE   | USER      |
|  0 | 4294566153 | ./#innodb_temp/temp_1.ibt  | 81920 | INACTIVE | NONE      |
|  0 | 4294566154 | ./#innodb_temp/temp_2.ibt  | 81920 | INACTIVE | NONE      |
|  0 | 4294566155 | ./#innodb_temp/temp_3.ibt  | 81920 | INACTIVE | NONE      |
|  0 | 4294566156 | ./#innodb_temp/temp_4.ibt  | 81920 | INACTIVE | NONE      |
|  0 | 4294566157 | ./#innodb_temp/temp_5.ibt  | 81920 | INACTIVE | NONE      |
|  0 | 4294566158 | ./#innodb_temp/temp_6.ibt  | 81920 | INACTIVE | NONE      |
|  0 | 4294566159 | ./#innodb_temp/temp_7.ibt  | 81920 | INACTIVE | NONE      |
|  0 | 4294566160 | ./#innodb_temp/temp_8.ibt  | 81920 | INACTIVE | NONE      |
+----+------------+----------------------------+-------+----------+-----------+
</pre>
<h4><a name="idm140091567057952"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-tables-table"></a>25.39.24 The INFORMATION_SCHEMA INNODB_TABLES Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091567049472"></a><p>
      The <a class="link" href="information-schema.html#innodb-tables-table" title="25.39.24 The INFORMATION_SCHEMA INNODB_TABLES Table"><code class="literal">INNODB_TABLES</code></a> table provides
      metadata about <code class="literal">InnoDB</code> tables.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-system-tables" title="15.14.3 InnoDB INFORMATION_SCHEMA Schema Object Tables">Section 15.14.3, “InnoDB INFORMATION_SCHEMA Schema Object Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-tables-table" title="25.39.24 The INFORMATION_SCHEMA INNODB_TABLES Table"><code class="literal">INNODB_TABLES</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TABLE_ID</code>
        </p><p>
          An identifier for the <code class="literal">InnoDB</code> table. This
          value is unique across all databases in the instance.
        </p></li><li class="listitem"><p>
          <code class="literal">NAME</code>
        </p><p>
          The name of the table, preceded by the schema (database) name
          where appropriate (for example, <code class="literal">test/t1</code>).
          Names of databases and user tables are in the same case as
          they were originally defined, possibly influenced by the
          <a class="link" href="server-administration.html#sysvar_lower_case_table_names"><code class="literal">lower_case_table_names</code></a>
          setting.
        </p></li><li class="listitem"><p>
          <code class="literal">FLAG</code>
        </p><p>
          A numeric value that represents bit-level information about
          table format and storage characteristics.
        </p></li><li class="listitem"><p>
          <code class="literal">N_COLS</code>
        </p><p>
          The number of columns in the table. The number reported
          includes three hidden columns that are created by
          <code class="literal">InnoDB</code> (<code class="literal">DB_ROW_ID</code>,
          <code class="literal">DB_TRX_ID</code>, and
          <code class="literal">DB_ROLL_PTR</code>). The number reported also
          includes <a class="link" href="glossary.html#glos_virtual_generated_column" title="virtual generated column">virtual
          generated columns</a>, if present.
        </p></li><li class="listitem"><p>
          <code class="literal">SPACE</code>
        </p><p>
          An identifier for the tablespace where the table resides. 0
          means the <code class="literal">InnoDB</code>
          <a class="link" href="glossary.html#glos_system_tablespace" title="system tablespace">system
          tablespace</a>. Any other number represents either a
          <a class="link" href="glossary.html#glos_file_per_table" title="file-per-table">file-per-table</a>
          tablespace or a general tablespace. This identifier stays the
          same after a <a class="link" href="sql-syntax.html#truncate-table" title="13.1.37 TRUNCATE TABLE Syntax"><code class="literal">TRUNCATE TABLE</code></a>
          statement. For file-per-table tablespaces, this identifier is
          unique for tables across all databases in the instance.
        </p></li><li class="listitem"><p>
          <code class="literal">ROW_FORMAT</code>
        </p><p>
          The table's row format (<code class="literal">Compact</code>,
          <code class="literal">Redundant</code>, <code class="literal">Dynamic</code>, or
          <code class="literal">Compressed</code>).
        </p></li><li class="listitem"><p>
          <code class="literal">ZIP_PAGE_SIZE</code>
        </p><p>
          The zip page size. Applies only to tables with a row format of
          <code class="literal">Compressed</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">SPACE_TYPE</code>
        </p><p>
          The type of tablespace to which the table belongs. Possible
          values include <code class="literal">System</code> for the system
          tablespace, <code class="literal">General</code> for general
          tablespaces, and <code class="literal">Single</code> for file-per-table
          tablespaces. Tables assigned to the system tablespace using
          <a class="link" href="sql-syntax.html#create-table" title="13.1.20 CREATE TABLE Syntax"><code class="literal">CREATE TABLE</code></a> or
          <a class="link" href="sql-syntax.html#alter-table" title="13.1.9 ALTER TABLE Syntax"><code class="literal">ALTER TABLE</code></a>
          <code class="literal">TABLESPACE=innodb_system</code> have a
          <code class="literal">SPACE_TYPE</code> of <code class="literal">General</code>.
          For more information, see <a class="link" href="sql-syntax.html#create-tablespace" title="13.1.21 CREATE TABLESPACE Syntax"><code class="literal">CREATE
          TABLESPACE</code></a>.
        </p></li><li class="listitem"><p>
          <code class="literal">INSTANT_COLS</code>
        </p><p>
          The number of columns in the table prior to adding the first
          instant column using <code class="literal">ALTER TABLE
          ... ADD COLUMN</code> with
          <code class="literal">ALGORITHM=INSTANT</code>.
</p></li></ul>
</div>
<h4><a name="idm140091567000912"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLES WHERE TABLE_ID = 214\G</code></strong>
*************************** 1. row ***************************
     TABLE_ID: 214
         NAME: test/t1
         FLAG: 129
       N_COLS: 4
        SPACE: 233
   ROW_FORMAT: Compact
ZIP_PAGE_SIZE: 0
   SPACE_TYPE: General
 INSTANT_COLS: 0
</pre>
<h4><a name="idm140091566998304"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-tablespaces-table"></a>25.39.25 The INFORMATION_SCHEMA INNODB_TABLESPACES Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091566989776"></a><p>
      The <a class="link" href="information-schema.html#innodb-tablespaces-table" title="25.39.25 The INFORMATION_SCHEMA INNODB_TABLESPACES Table"><code class="literal">INNODB_TABLESPACES</code></a> table provides
      metadata about <code class="literal">InnoDB</code> file-per-table, general,
      and undo tablespaces.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-system-tables" title="15.14.3 InnoDB INFORMATION_SCHEMA Schema Object Tables">Section 15.14.3, “InnoDB INFORMATION_SCHEMA Schema Object Tables”</a>.
</p>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        The <code class="literal">INFORMATION_SCHEMA</code>
        <a class="link" href="information-schema.html#files-table" title="25.11 The INFORMATION_SCHEMA FILES Table"><code class="literal">FILES</code></a> table reports metadata for
        <code class="literal">InnoDB</code> tablespace types including
        file-per-table tablespaces, general tablespaces, the system
        tablespace, the global temporary tablespace, and undo
        tablespaces.
</p>
</div>
<p>
      The <a class="link" href="information-schema.html#innodb-tablespaces-table" title="25.39.25 The INFORMATION_SCHEMA INNODB_TABLESPACES Table"><code class="literal">INNODB_TABLESPACES</code></a> table has
      these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">SPACE</code>
        </p><p>
          The tablespace ID.
        </p></li><li class="listitem"><p>
          <code class="literal">NAME</code>
        </p><p>
          The schema (database) and table name.
        </p></li><li class="listitem"><p>
          <code class="literal">FLAG</code>
        </p><p>
          A numeric value that represents bit-level information about
          tablespace format and storage characteristics.
        </p></li><li class="listitem"><p>
          <code class="literal">ROW_FORMAT</code>
        </p><p>
          The tablespace row format (<code class="literal">Compact or
          Redundant</code>, <code class="literal">Dynamic</code> or
          <code class="literal">Compressed</code>, or <code class="literal">Undo</code>).
          The data in this column is interpreted from the tablespace
          flag information that resides in the data file.
        </p><p>
          There is no way to determine from this flag information if the
          tablespace row format is <code class="literal">Redundant</code> or
          <code class="literal">Compact</code>, which is why one of the possible
          <code class="literal">ROW_FORMAT</code> values is <code class="literal">Compact or
          Redundant</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">PAGE_SIZE</code>
        </p><p>
          The tablespace page size. The data in this column is
          interpreted from the tablespace flags information that resides
          in the <a class="link" href="glossary.html#glos_ibd_file" title=".ibd file"><code class="filename">.ibd</code>
          file</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">ZIP_PAGE_SIZE</code>
        </p><p>
          The tablespace zip page size. The data in this column is
          interpreted from the tablespace flags information that resides
          in the <a class="link" href="glossary.html#glos_ibd_file" title=".ibd file"><code class="filename">.ibd</code>
          file</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">SPACE_TYPE</code>
        </p><p>
          The type of tablespace. Possible values include
          <code class="literal">General</code> for general tablespaces,
          <code class="literal">Single</code> for file-per-table tablespaces,
          <code class="literal">System</code> for the system tablespace, and
          <code class="literal">Undo</code> for undo tablespaces.
        </p></li><li class="listitem"><p>
          <code class="literal">FS_BLOCK_SIZE</code>
        </p><p>
          The file system block size, which is the unit size used for
          hole punching. This column pertains to the
          <code class="literal">InnoDB</code>
          <a class="link" href="innodb-storage-engine.html#innodb-page-compression" title="15.9.2 InnoDB Page Compression">transparent page
          compression</a> feature.
        </p></li><li class="listitem"><p>
          <code class="literal">FILE_SIZE</code>
        </p><p>
          The apparent size of the file, which represents the maximum
          size of the file, uncompressed. This column pertains to the
          <code class="literal">InnoDB</code>
          <a class="link" href="innodb-storage-engine.html#innodb-page-compression" title="15.9.2 InnoDB Page Compression">transparent page
          compression</a> feature.
        </p></li><li class="listitem"><p>
          <code class="literal">ALLOCATED_SIZE</code>
        </p><p>
          The actual size of the file, which is the amount of space
          allocated on disk. This column pertains to the
          <code class="literal">InnoDB</code>
          <a class="link" href="innodb-storage-engine.html#innodb-page-compression" title="15.9.2 InnoDB Page Compression">transparent page
          compression</a> feature.
        </p></li><li class="listitem"><p>
          <code class="literal">SERVER_VERSION</code>
        </p><p>
          The MySQL version that created the tablespace, or the MySQL
          version into which the tablespace was imported, or the version
          of the last major MySQL version upgrade. The value is
          unchanged by a release series upgrade, such as an upgrade from
          MySQL 8.0.<em class="replaceable"><code>x</code></em> to
          8.0.<em class="replaceable"><code>y</code></em>. The value can be considered
          a <span class="quote">“<span class="quote">creation</span>”</span> marker or <span class="quote">“<span class="quote">certified</span>”</span>
          marker for the tablespace.
        </p></li><li class="listitem"><p>
          <code class="literal">SPACE_VERSION</code>
        </p><p>
          The tablespace version, used to track changes to the
          tablespace format.
        </p></li><li class="listitem"><p>
          <code class="literal">ENCRYPTION</code>
        </p><p>
          Whether the tablespace is encrypted. This column was added in
          MySQL 8.0.13.
        </p></li><li class="listitem"><p>
          <code class="literal">STATE</code>
        </p><p>
          The tablespace state. This column was added in MySQL 8.0.14.
        </p><p>
          For file-per-table and general tablespaces, states include:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              <code class="literal">normal</code>: The tablespace is normal and
              active.
            </p></li><li class="listitem"><p>
              <code class="literal">discarded</code>: The tablespace was discarded
              by an <a class="link" href="sql-syntax.html#alter-table" title="13.1.9 ALTER TABLE Syntax"><code class="literal">ALTER
              TABLE ... DISCARD TABLESPACE</code></a> statement.
            </p></li><li class="listitem"><p>
              <code class="literal">corrupted</code>: The tablespace is identified
              by <code class="literal">InnoDB</code> as corrupted.
</p></li></ul>
</div>
<p>
          For undo tablespaces, states include:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: circle; "><li class="listitem"><p>
              <code class="literal">active</code>: Rollback segments in the undo
              tablespace can be allocated to new transactions.
            </p></li><li class="listitem"><p>
              <code class="literal">inactive</code>: Rollback segments in the undo
              tablespace are no longer used by new transactions. The
              truncate process is in progress. The undo tablespace was
              either selected by the purge thread implicitly or was made
              inactive by an
              <a class="link" href="sql-syntax.html#alter-tablespace" title="13.1.10 ALTER TABLESPACE Syntax"><code class="literal">ALTER
              UNDO TABLESPACE ... SET INACTIVE</code></a> statement.
            </p></li><li class="listitem"><p>
              <code class="literal">empty</code>: The undo tablespace was
              truncated and is no longer active. It is ready to be
              dropped or made active again by an
              <a class="link" href="sql-syntax.html#alter-tablespace" title="13.1.10 ALTER TABLESPACE Syntax"><code class="literal">ALTER
              UNDO TABLESPACE ... SET INACTIVE</code></a> statement.
</p></li></ul>
</div>
</li></ul>
</div>
<h4><a name="idm140091566916896"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES WHERE SPACE = 26\G</code></strong>
*************************** 1. row ***************************
         SPACE: 26
          NAME: test/t1
          FLAG: 0
    ROW_FORMAT: Compact or Redundant
     PAGE_SIZE: 16384
 ZIP_PAGE_SIZE: 0
    SPACE_TYPE: Single
 FS_BLOCK_SIZE: 4096
     FILE_SIZE: 98304
ALLOCATED_SIZE: 65536
SERVER_VERSION: 8.0.4
 SPACE_VERSION: 1
    ENCRYPTION: N
         STATE: normal
</pre>
<h4><a name="idm140091566914160"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-tablespaces-brief-table"></a>25.39.26 The INFORMATION_SCHEMA INNODB_TABLESPACES_BRIEF Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091566905568"></a><p>
      The <a class="link" href="information-schema.html#innodb-tablespaces-brief-table" title="25.39.26 The INFORMATION_SCHEMA INNODB_TABLESPACES_BRIEF Table"><code class="literal">INNODB_TABLESPACES_BRIEF</code></a> table
      provides space ID, name, path, flag, and space type metadata for
      file-per-table, general, undo, and system tablespaces.
    </p><p>
      <a class="link" href="information-schema.html#innodb-tablespaces-table" title="25.39.25 The INFORMATION_SCHEMA INNODB_TABLESPACES Table"><code class="literal">INNODB_TABLESPACES</code></a> provides the same
      metadata but loads more slowly because other metadata provided by
      the table, such as <code class="literal">FS_BLOCK_SIZE</code>,
      <code class="literal">FILE_SIZE</code>, and
      <code class="literal">ALLOCATED_SIZE</code>, must be loaded dynamically.
    </p><p>
      Space and path metadata is also provided by the
      <a class="link" href="information-schema.html#innodb-datafiles-table" title="25.39.9 The INFORMATION_SCHEMA INNODB_DATAFILES Table"><code class="literal">INNODB_DATAFILES</code></a> table.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-tablespaces-brief-table" title="25.39.26 The INFORMATION_SCHEMA INNODB_TABLESPACES_BRIEF Table"><code class="literal">INNODB_TABLESPACES_BRIEF</code></a> table
      has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">SPACE</code>
        </p><p>
          The tablespace ID.
        </p></li><li class="listitem"><p>
          <code class="literal">NAME</code>
        </p><p>
          The tablespace name. For file-per-table tablespaces, the name
          is in the form of
          <em class="replaceable"><code>schema/table_name</code></em>.
        </p></li><li class="listitem"><p>
          <code class="literal">PATH</code>
        </p><p>
          The tablespace data file path. If a
          <a class="link" href="glossary.html#glos_file_per_table" title="file-per-table">file-per-table</a>
          tablespace is created in a location outside the MySQL data
          directory, the path value is a fully qualified directory path.
          Otherwise, the path is relative to the data directory.
        </p></li><li class="listitem"><p>
          <code class="literal">FLAG</code>
        </p><p>
          A numeric value that represents bit-level information about
          tablespace format and storage characteristics.
        </p></li><li class="listitem"><p>
          <code class="literal">SPACE_TYPE</code>
        </p><p>
          The type of tablespace. Possible values include
          <code class="literal">General</code> for <code class="literal">InnoDB</code>
          general tablespaces, <code class="literal">Single</code> for
          <code class="literal">InnoDB</code> file-per-table tablespaces, and
          <code class="literal">System</code> for the <code class="literal">InnoDB</code>
          system tablespace.
</p></li></ul>
</div>
<h4><a name="idm140091566878992"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESPACES_BRIEF WHERE SPACE = 7;</code></strong>
+-------+---------+---------------+-------+------------+
| SPACE | NAME    | PATH          | FLAG  | SPACE_TYPE |
+-------+---------+---------------+-------+------------+
| 7     | test/t1 | ./test/t1.ibd | 16417 | Single     |
+-------+---------+---------------+-------+------------+
</pre>
<h4><a name="idm140091566876320"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-tablestats-table"></a>25.39.27 The INFORMATION_SCHEMA INNODB_TABLESTATS View</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091566867840"></a><p>
      The <a class="link" href="information-schema.html#innodb-tablestats-table" title="25.39.27 The INFORMATION_SCHEMA INNODB_TABLESTATS View"><code class="literal">INNODB_TABLESTATS</code></a> table provides
      a view of low-level status information about
      <code class="literal">InnoDB</code> tables. This data is used by the MySQL
      optimizer to calculate which index to use when querying an
      <code class="literal">InnoDB</code> table. This information is derived from
      in-memory data structures rather than data stored on disk. There
      is no corresponding internal <code class="literal">InnoDB</code> system
      table.
    </p><p>
      <code class="literal">InnoDB</code> tables are represented in this view if
      they have been opened since the last server restart and have not
      aged out of the table cache. Tables for which persistent stats are
      available are always represented in this view.
    </p><p>
      Table statistics are updated only for
      <a class="link" href="sql-syntax.html#delete" title="13.2.2 DELETE Syntax"><code class="literal">DELETE</code></a> or
      <a class="link" href="sql-syntax.html#update" title="13.2.12 UPDATE Syntax"><code class="literal">UPDATE</code></a> operations that modify
      indexed columns. Statistics are not updated by operations that
      modify only nonindexed columns.
    </p><p>
      <a class="link" href="sql-syntax.html#analyze-table" title="13.7.3.1 ANALYZE TABLE Syntax"><code class="literal">ANALYZE TABLE</code></a> clears table
      statistics and sets the <code class="literal">STATS_INITIALIZED</code>
      column to <code class="literal">Uninitialized</code>. Statistics are
      collected again the next time the table is accessed.
    </p><p>
      For related usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-system-tables" title="15.14.3 InnoDB INFORMATION_SCHEMA Schema Object Tables">Section 15.14.3, “InnoDB INFORMATION_SCHEMA Schema Object Tables”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-tablestats-table" title="25.39.27 The INFORMATION_SCHEMA INNODB_TABLESTATS View"><code class="literal">INNODB_TABLESTATS</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TABLE_ID</code>
        </p><p>
          An identifier representing the table for which statistics are
          available; the same value as
          <code class="literal">INNODB_TABLES.TABLE_ID</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">NAME</code>
        </p><p>
          The name of the table; the same value as
          <code class="literal">INNODB_TABLES.NAME</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">STATS_INITIALIZED</code>
        </p><p>
          The value is <code class="literal">Initialized</code> if the statistics
          are already collected, <code class="literal">Uninitialized</code> if
          not.
        </p></li><li class="listitem"><p>
          <code class="literal">NUM_ROWS</code>
        </p><p>
          The current estimated number of rows in the table. Updated
          after each DML operation. The value could be imprecise if
          uncommitted transactions are inserting into or deleting from
          the table.
        </p></li><li class="listitem"><p>
          <code class="literal">CLUST_INDEX_SIZE</code>
        </p><p>
          The number of pages on disk that store the clustered index,
          which holds the <code class="literal">InnoDB</code> table data in
          primary key order. This value might be null if no statistics
          are collected yet for the table.
        </p></li><li class="listitem"><p>
          <code class="literal">OTHER_INDEX_SIZE</code>
        </p><p>
          The number of pages on disk that store all secondary indexes
          for the table. This value might be null if no statistics are
          collected yet for the table.
        </p></li><li class="listitem"><p>
          <code class="literal">MODIFIED_COUNTER</code>
        </p><p>
          The number of rows modified by DML operations, such as
          <code class="literal">INSERT</code>, <code class="literal">UPDATE</code>,
          <code class="literal">DELETE</code>, and also cascade operations from
          foreign keys. This column is reset each time table statistics
          are recalculated
        </p></li><li class="listitem"><p>
          <code class="literal">AUTOINC</code>
        </p><p>
          The next number to be issued for any auto-increment-based
          operation. The rate at which the <code class="literal">AUTOINC</code>
          value changes depends on how many times auto-increment numbers
          have been requested and how many numbers are granted per
          request.
        </p></li><li class="listitem"><p>
          <code class="literal">REF_COUNT</code>
        </p><p>
          When this counter reaches zero, the table metadata can be
          evicted from the table cache.
</p></li></ul>
</div>
<h4><a name="idm140091566826864"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_TABLESTATS where TABLE_ID = 71\G</code></strong>
*************************** 1. row ***************************
         TABLE_ID: 71
             NAME: test/t1
STATS_INITIALIZED: Initialized
         NUM_ROWS: 1
 CLUST_INDEX_SIZE: 1
 OTHER_INDEX_SIZE: 0
 MODIFIED_COUNTER: 1
          AUTOINC: 0
        REF_COUNT: 1
</pre>
<h4><a name="idm140091566824208"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          This table is useful primarily for expert-level performance
          monitoring, or when developing performance-related extensions
          for MySQL.
        </p></li><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-temp-table-info-table"></a>25.39.28 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091566814656"></a><p>
      The <a class="link" href="information-schema.html#innodb-temp-table-info-table" title="25.39.28 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table"><code class="literal">INNODB_TEMP_TABLE_INFO</code></a> table
      provides information about user-created <code class="literal">InnoDB</code>
      temporary tables that are active in an <code class="literal">InnoDB</code>
      instance. It does not provide information about internal
      <code class="literal">InnoDB</code> temporary tables used by the optimizer.
      The <a class="link" href="information-schema.html#innodb-temp-table-info-table" title="25.39.28 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table"><code class="literal">INNODB_TEMP_TABLE_INFO</code></a> table is
      created when first queried, exists only in memory, and is not
      persisted to disk.
    </p><p>
      For usage information and examples, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-temp-table-info" title="15.14.7 InnoDB INFORMATION_SCHEMA Temporary Table Info Table">Section 15.14.7, “InnoDB INFORMATION_SCHEMA Temporary Table Info Table”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-temp-table-info-table" title="25.39.28 The INFORMATION_SCHEMA INNODB_TEMP_TABLE_INFO Table"><code class="literal">INNODB_TEMP_TABLE_INFO</code></a> table has
      these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TABLE_ID</code>
        </p><p>
          The table ID of the temporary table.
        </p></li><li class="listitem"><p>
          <code class="literal">NAME</code>
        </p><p>
          The name of the temporary table.
        </p></li><li class="listitem"><p>
          <code class="literal">N_COLS</code>
        </p><p>
          The number of columns in the temporary table. The number
          includes three hidden columns created by
          <code class="literal">InnoDB</code> (<code class="literal">DB_ROW_ID</code>,
          <code class="literal">DB_TRX_ID</code>, and
          <code class="literal">DB_ROLL_PTR</code>).
        </p></li><li class="listitem"><p>
          <code class="literal">SPACE</code>
        </p><p>
          The ID of the temporary tablespace where the temporary table
          resides.
</p></li></ul>
</div>
<h4><a name="idm140091566793856"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>CREATE TEMPORARY TABLE t1 (c1 INT PRIMARY KEY) ENGINE=INNODB;</code></strong>

mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_TEMP_TABLE_INFO\G</code></strong>
*************************** 1. row ***************************
TABLE_ID: 97
    NAME: #sql8c88_43_0
  N_COLS: 4
   SPACE: 76
</pre>
<h4><a name="idm140091566790592"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          This table is useful primarily for expert-level monitoring.
        </p></li><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-trx-table"></a>25.39.29 The INFORMATION_SCHEMA INNODB_TRX Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091566781200"></a><p>
      The <a class="link" href="information-schema.html#innodb-trx-table" title="25.39.29 The INFORMATION_SCHEMA INNODB_TRX Table"><code class="literal">INNODB_TRX</code></a> table provides
      information about every transaction (excluding read-only
      transactions) currently executing inside
      <code class="literal">InnoDB</code>, including whether the transaction is
      waiting for a lock, when the transaction started, and the SQL
      statement the transaction is executing, if any.
    </p><p>
      For usage information, see
      <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-examples" title="15.14.2.1 Using InnoDB Transaction and Locking Information">Section 15.14.2.1, “Using InnoDB Transaction and Locking Information”</a>.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-trx-table" title="25.39.29 The INFORMATION_SCHEMA INNODB_TRX Table"><code class="literal">INNODB_TRX</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TRX_ID</code>
        </p><p>
          A unique transaction ID number, internal to
          <code class="literal">InnoDB</code>. These IDs are not created for
          transactions that are read only and nonlocking. For details,
          see <a class="xref" href="optimization.html#innodb-performance-ro-txn" title="8.5.3 Optimizing InnoDB Read-Only Transactions">Section 8.5.3, “Optimizing InnoDB Read-Only Transactions”</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_WEIGHT</code>
        </p><p>
          The weight of a transaction, reflecting (but not necessarily
          the exact count of) the number of rows altered and the number
          of rows locked by the transaction. To resolve a deadlock,
          <code class="literal">InnoDB</code> selects the transaction with the
          smallest weight as the <span class="quote">“<span class="quote">victim</span>”</span> to roll back.
          Transactions that have changed nontransactional tables are
          considered heavier than others, regardless of the number of
          altered and locked rows.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_STATE</code>
        </p><p>
          The transaction execution state. Permitted values are
          <code class="literal">RUNNING</code>, <code class="literal">LOCK WAIT</code>,
          <code class="literal">ROLLING BACK</code>, and
          <code class="literal">COMMITTING</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_STARTED</code>
        </p><p>
          The transaction start time.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_REQUESTED_LOCK_ID</code>
        </p><p>
          The ID of the lock the transaction is currently waiting for,
          if <code class="literal">TRX_STATE</code> is <code class="literal">LOCK
          WAIT</code>; otherwise <code class="literal">NULL</code>. To obtain
          details about the lock, join this column with the
          <code class="literal">ENGINE_LOCK_ID</code> column of the Performance
          Schema <a class="link" href="performance-schema.html#data-locks-table" title="26.12.12.1 The data_locks Table"><code class="literal">data_locks</code></a> table.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_WAIT_STARTED</code>
        </p><p>
          The time when the transaction started waiting on the lock, if
          <code class="literal">TRX_STATE</code> is <code class="literal">LOCK WAIT</code>;
          otherwise <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_MYSQL_THREAD_ID</code>
        </p><p>
          The MySQL thread ID. To obtain details about the thread, join
          this column with the <code class="literal">ID</code> column of the
          <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#processlist-table" title="25.19 The INFORMATION_SCHEMA PROCESSLIST Table"><code class="literal">PROCESSLIST</code></a> table, but see
          <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-internal-data" title="15.14.2.3 Persistence and Consistency of InnoDB Transaction and Locking Information">Section 15.14.2.3, “Persistence and Consistency of InnoDB Transaction and Locking
        Information”</a>.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_QUERY</code>
        </p><p>
          The SQL statement that is being executed by the transaction.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_OPERATION_STATE</code>
        </p><p>
          The transaction's current operation, if any; otherwise
          <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_TABLES_IN_USE</code>
        </p><p>
          The number of <code class="literal">InnoDB</code> tables used while
          processing the current SQL statement of this transaction.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_TABLES_LOCKED</code>
        </p><p>
          The number of <code class="literal">InnoDB</code> tables that the
          current SQL statement has row locks on. (Because these are row
          locks, not table locks, the tables can usually still be read
          from and written to by multiple transactions, despite some
          rows being locked.)
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_LOCK_STRUCTS</code>
        </p><p>
          The number of locks reserved by the transaction.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_LOCK_MEMORY_BYTES</code>
        </p><p>
          The total size taken up by the lock structures of this
          transaction in memory.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_ROWS_LOCKED</code>
        </p><p>
          The approximate number or rows locked by this transaction. The
          value might include delete-marked rows that are physically
          present but not visible to the transaction.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_ROWS_MODIFIED</code>
        </p><p>
          The number of modified and inserted rows in this transaction.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_CONCURRENCY_TICKETS</code>
        </p><p>
          A value indicating how much work the current transaction can
          do before being swapped out, as specified by the
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_concurrency_tickets"><code class="literal">innodb_concurrency_tickets</code></a>
          system variable.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_ISOLATION_LEVEL</code>
        </p><p>
          The isolation level of the current transaction.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_UNIQUE_CHECKS</code>
        </p><p>
          Whether unique checks are turned on or off for the current
          transaction. For example, they might be turned off during a
          bulk data load.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_FOREIGN_KEY_CHECKS</code>
        </p><p>
          Whether foreign key checks are turned on or off for the
          current transaction. For example, they might be turned off
          during a bulk data load.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_LAST_FOREIGN_KEY_ERROR</code>
        </p><p>
          The detailed error message for the last foreign key error, if
          any; otherwise <code class="literal">NULL</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_ADAPTIVE_HASH_LATCHED</code>
        </p><p>
          Whether the adaptive hash index is locked by the current
          transaction. When the adaptive hash index search system is
          partitioned, a single transaction does not lock the entire
          adaptive hash index. Adaptive hash index partitioning is
          controlled by
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_adaptive_hash_index_parts"><code class="literal">innodb_adaptive_hash_index_parts</code></a>,
          which is set to 8 by default.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_ADAPTIVE_HASH_TIMEOUT</code>
        </p><p>
          Whether to relinquish the search latch immediately for the
          adaptive hash index, or reserve it across calls from MySQL.
          When there is no adaptive hash index contention, this value
          remains zero and statements reserve the latch until they
          finish. During times of contention, it counts down to zero,
          and statements release the latch immediately after each row
          lookup. When the adaptive hash index search system is
          partitioned (controlled by
          <a class="link" href="innodb-storage-engine.html#sysvar_innodb_adaptive_hash_index_parts"><code class="literal">innodb_adaptive_hash_index_parts</code></a>),
          the value remains 0.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_IS_READ_ONLY</code>
        </p><p>
          A value of 1 indicates the transaction is read only.
        </p></li><li class="listitem"><p>
          <code class="literal">TRX_AUTOCOMMIT_NON_LOCKING</code>
        </p><p>
          A value of 1 indicates the transaction is a
          <a class="link" href="sql-syntax.html#select" title="13.2.10 SELECT Syntax"><code class="literal">SELECT</code></a> statement that does not
          use the <code class="literal">FOR UPDATE</code> or <code class="literal">LOCK IN
          SHARED MODE</code> clauses, and is executing with
          <a class="link" href="server-administration.html#sysvar_autocommit"><code class="literal">autocommit</code></a> enabled so that
          the transaction contains only this one statement. When this
          column and <code class="literal">TRX_IS_READ_ONLY</code> are both 1,
          <code class="literal">InnoDB</code> optimizes the transaction to reduce
          the overhead associated with transactions that change table
          data.
</p></li></ul>
</div>
<h4><a name="idm140091566697920"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_TRX\G</code></strong>
*************************** 1. row ***************************
                    trx_id: 1510
                 trx_state: RUNNING
               trx_started: 2014-11-19 13:24:40
     trx_requested_lock_id: NULL
          trx_wait_started: NULL
                trx_weight: 586739
       trx_mysql_thread_id: 2
                 trx_query: DELETE FROM employees.salaries WHERE salary &gt; 65000
       trx_operation_state: updating or deleting
         trx_tables_in_use: 1
         trx_tables_locked: 1
          trx_lock_structs: 3003
     trx_lock_memory_bytes: 450768
           trx_rows_locked: 1407513
         trx_rows_modified: 583736
   trx_concurrency_tickets: 0
       trx_isolation_level: REPEATABLE READ
         trx_unique_checks: 1
    trx_foreign_key_checks: 1
trx_last_foreign_key_error: NULL
 trx_adaptive_hash_latched: 0
 trx_adaptive_hash_timeout: 10000
          trx_is_read_only: 0
trx_autocommit_non_locking: 0
</pre>
<h4><a name="idm140091566692928"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          Use this table to help diagnose performance problems that
          occur during times of heavy concurrent load. Its contents are
          updated as described in
          <a class="xref" href="innodb-storage-engine.html#innodb-information-schema-internal-data" title="15.14.2.3 Persistence and Consistency of InnoDB Transaction and Locking Information">Section 15.14.2.3, “Persistence and Consistency of InnoDB Transaction and Locking
        Information”</a>.
        </p></li><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="innodb-virtual-table"></a>25.39.30 The INFORMATION_SCHEMA INNODB_VIRTUAL Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091566682768"></a><p>
      The <a class="link" href="information-schema.html#innodb-virtual-table" title="25.39.30 The INFORMATION_SCHEMA INNODB_VIRTUAL Table"><code class="literal">INNODB_VIRTUAL</code></a> table provides
      metadata about <code class="literal">InnoDB</code>
      <a class="link" href="glossary.html#glos_virtual_generated_column" title="virtual generated column">virtual generated
      columns</a> and columns upon which virtual generated columns
      are based.
    </p><p>
      A row appears in the <a class="link" href="information-schema.html#innodb-virtual-table" title="25.39.30 The INFORMATION_SCHEMA INNODB_VIRTUAL Table"><code class="literal">INNODB_VIRTUAL</code></a>
      table for each column upon which a virtual generated column is
      based.
    </p><p>
      The <a class="link" href="information-schema.html#innodb-virtual-table" title="25.39.30 The INFORMATION_SCHEMA INNODB_VIRTUAL Table"><code class="literal">INNODB_VIRTUAL</code></a> table has these
      columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">TABLE_ID</code>
        </p><p>
          An identifier representing the table associated with the
          virtual column; the same value as
          <code class="literal">INNODB_TABLES.TABLE_ID</code>.
        </p></li><li class="listitem"><p>
          <code class="literal">POS</code>
        </p><p>
          The position value of the
          <a class="link" href="glossary.html#glos_virtual_generated_column" title="virtual generated column">virtual
          generated column</a>. The value is large because it encodes
          the column sequence number and ordinal position. The formula
          used to calculate the value uses a bitwise operation:
        </p><pre data-lang="simple" class="programlisting">
((<em class="replaceable"><code>n</code></em>th virtual generated column for the InnoDB instance + 1) &lt;&lt; 16)
+ the ordinal position of the virtual generated column
</pre><p>
          For example, if the first virtual generated column in the
          <code class="literal">InnoDB</code> instance is the third column of the
          table, the formula is <code class="literal">(0 + 1) &lt;&lt; 16) +
          2</code>. The first virtual generated column in the
          <code class="literal">InnoDB</code> instance is always number 0. As the
          third column in the table, the ordinal position of the virtual
          generated column is 2. Ordinal positions are counted from 0.
        </p></li><li class="listitem"><p>
          <code class="literal">BASE_POS</code>
        </p><p>
          The ordinal position of the columns upon which a virtual
          generated column is based.
</p></li></ul>
</div>
<h4><a name="idm140091566661968"></a>Example</h4>
<pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>CREATE TABLE `t1` (</code></strong>
         <strong class="userinput"><code>`a` int(11) DEFAULT NULL,</code></strong>
         <strong class="userinput"><code>`b` int(11) DEFAULT NULL,</code></strong>
         <strong class="userinput"><code>`c` int(11) GENERATED ALWAYS AS (a+b) VIRTUAL,</code></strong>
         <strong class="userinput"><code>`h` varchar(10) DEFAULT NULL</code></strong>
       <strong class="userinput"><code>) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;</code></strong>

mysql&gt; <strong class="userinput"><code>SELECT * FROM INFORMATION_SCHEMA.INNODB_VIRTUAL</code></strong>
       <strong class="userinput"><code>WHERE TABLE_ID IN</code></strong>
         <strong class="userinput"><code>(SELECT TABLE_ID FROM INFORMATION_SCHEMA.INNODB_TABLES</code></strong>
          <strong class="userinput"><code>WHERE NAME LIKE "test/t1");</code></strong>
+----------+-------+----------+
| TABLE_ID | POS   | BASE_POS |
+----------+-------+----------+
|       98 | 65538 |        0 |
|       98 | 65538 |        1 |
+----------+-------+----------+
</pre>
<h4><a name="idm140091566653040"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          If a constant value is assigned to a
          <a class="link" href="glossary.html#glos_virtual_generated_column" title="virtual generated column">virtual
          generated column</a>, as in the following table, an entry
          for the column does not appear in the
          <code class="literal">INNODB_VIRTUAL</code> table. For an entry to
          appear, a virtual generated column must have a base column.
        </p><pre data-lang="sql" class="programlisting">
CREATE TABLE `t1` (
  `a` int(11) DEFAULT NULL,
  `b` int(11) DEFAULT NULL,
  `c` int(11) GENERATED ALWAYS AS (5) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
</pre><p>
          However, metadata for such a column does appear in the
          <a class="link" href="information-schema.html#innodb-columns-table" title="25.39.8 The INFORMATION_SCHEMA INNODB_COLUMNS Table"><code class="literal">INNODB_COLUMNS</code></a> table.
        </p></li><li class="listitem"><p>
          You must have the <a class="link" href="security.html#priv_process"><code class="literal">PROCESS</code></a>
          privilege to query this table.
        </p></li><li class="listitem"><p>
          Use the <code class="literal">INFORMATION_SCHEMA</code>
          <a class="link" href="information-schema.html#columns-table" title="25.6 The INFORMATION_SCHEMA COLUMNS Table"><code class="literal">COLUMNS</code></a> table or the
          <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> statement to view
          additional information about the columns of this table,
          including data types and default values.
</p></li></ul>
</div>

</div>

</div>

<div class="section">

<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="thread-pool-i_s-tables"></a>25.40 INFORMATION_SCHEMA Thread Pool Tables</h2>

</div>

</div>

</div>

<div class="toc">
<dl class="toc"><dt><span class="section"><a href="information-schema.html#tp-thread-group-state-table-old">25.40.1 The INFORMATION_SCHEMA TP_THREAD_GROUP_STATE Table</a></span></dt><dt><span class="section"><a href="information-schema.html#tp-thread-group-stats-table-old">25.40.2 The INFORMATION_SCHEMA TP_THREAD_GROUP_STATS Table</a></span></dt><dt><span class="section"><a href="information-schema.html#tp-thread-state-table-old">25.40.3 The INFORMATION_SCHEMA TP_THREAD_STATE Table</a></span></dt></dl>
</div>
<a class="indexterm" name="idm140091566639056"></a>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
      As of MySQL 8.0.14, the thread pool
      <code class="literal">INFORMATION_SCHEMA</code> tables are also available as
      Performance Schema tables. (See
      <a class="xref" href="performance-schema.html#performance-schema-thread-pool-tables" title="26.12.15 Performance Schema Thread Pool Tables">Section 26.12.15, “Performance Schema Thread Pool Tables”</a>.) The
      <code class="literal">INFORMATION_SCHEMA</code> tables are deprecated and
      will be removed in a future MySQL version. Applications should
      transition away from the old tables to the new tables. For
      example, if an application uses this query:
    </p><pre data-lang="sql" class="programlisting">
SELECT * FROM INFORMATION_SCHEMA.TP_THREAD_STATE;
</pre><p>
      The application should use this query instead:
    </p><pre data-lang="sql" class="programlisting">
SELECT * FROM performance_schema.tp_thread_state;
</pre>
</div>
<p>
    The following sections describe the
    <code class="literal">INFORMATION_SCHEMA</code> tables associated with the
    thread pool plugin (see <a class="xref" href="server-administration.html#thread-pool" title="5.6.3 MySQL Enterprise Thread Pool">Section 5.6.3, “MySQL Enterprise Thread Pool”</a>). They provide
    information about thread pool operation:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
        <a class="link" href="information-schema.html#tp-thread-group-state-table-old" title="25.40.1 The INFORMATION_SCHEMA TP_THREAD_GROUP_STATE Table"><code class="literal">TP_THREAD_GROUP_STATE</code></a>:
        Information about thread pool thread group states
      </p></li><li class="listitem"><p>
        <a class="link" href="information-schema.html#tp-thread-group-stats-table-old" title="25.40.2 The INFORMATION_SCHEMA TP_THREAD_GROUP_STATS Table"><code class="literal">TP_THREAD_GROUP_STATS</code></a>:
        Thread group statistics
      </p></li><li class="listitem"><p>
        <a class="link" href="information-schema.html#tp-thread-state-table-old" title="25.40.3 The INFORMATION_SCHEMA TP_THREAD_STATE Table"><code class="literal">TP_THREAD_STATE</code></a>:
        Information about thread pool thread states
</p></li></ul>
</div>
<p>
    Rows in these tables represent snapshots in time. In the case of
    <code class="literal">TP_THREAD_STATE</code>, all rows for a thread group
    comprise a snapshot in time. Thus, the MySQL server holds the mutex
    of the thread group while producing the snapshot. But it does not
    hold mutexes on all thread groups at the same time, to prevent a
    statement against <code class="literal">TP_THREAD_STATE</code> from blocking
    the entire MySQL server.
  </p><p>
    The <code class="literal">INFORMATION_SCHEMA</code> thread pool tables are
    implemented by individual plugins and the decision whether to load
    one can be made independently of the others (see
    <a class="xref" href="server-administration.html#thread-pool-installation" title="5.6.3.2 Thread Pool Installation">Section 5.6.3.2, “Thread Pool Installation”</a>). However, the content of
    all the tables depends on the thread pool plugin being enabled. If a
    table plugin is enabled but the thread pool plugin is not, the table
    becomes visible and can be accessed but will be empty.
</p>
<div class="section">

<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="tp-thread-group-state-table-old"></a>25.40.1 The INFORMATION_SCHEMA TP_THREAD_GROUP_STATE Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091566617232"></a>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        As of MySQL 8.0.14, the thread pool
        <code class="literal">INFORMATION_SCHEMA</code> tables are also available
        as Performance Schema tables. (See
        <a class="xref" href="performance-schema.html#performance-schema-thread-pool-tables" title="26.12.15 Performance Schema Thread Pool Tables">Section 26.12.15, “Performance Schema Thread Pool Tables”</a>.) The
        <code class="literal">INFORMATION_SCHEMA</code> tables are deprecated and
        will be removed in a future MySQL version. Applications should
        transition away from the old tables to the new tables. For
        example, if an application uses this query:
      </p><pre data-lang="sql" class="programlisting">
SELECT * FROM INFORMATION_SCHEMA.TP_THREAD_GROUP_STATE;
</pre><p>
        The application should use this query instead:
      </p><pre data-lang="sql" class="programlisting">
SELECT * FROM performance_schema.tp_thread_group_state;
</pre>
</div>
<p>
      The <code class="literal">TP_THREAD_GROUP_STATE</code> table has one row per
      thread group in the thread pool. Each row provides information
      about the current state of a group.
    </p><p>
      For descriptions of the columns in the
      <code class="literal">INFORMATION_SCHEMA</code>
      <code class="literal">TP_THREAD_GROUP_STATE</code> table, see
      <a class="xref" href="performance-schema.html#tp-thread-group-state-table" title="26.12.15.1 The tp_thread_group_state Table">Section 26.12.15.1, “The tp_thread_group_state Table”</a>. The Performance
      Schema <a class="link" href="performance-schema.html#tp-thread-group-state-table" title="26.12.15.1 The tp_thread_group_state Table"><code class="literal">tp_thread_group_state</code></a> table
      has equivalent columns.
</p>
</div>

<div class="section">

<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="tp-thread-group-stats-table-old"></a>25.40.2 The INFORMATION_SCHEMA TP_THREAD_GROUP_STATS Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091566603456"></a>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        As of MySQL 8.0.14, the thread pool
        <code class="literal">INFORMATION_SCHEMA</code> tables are also available
        as Performance Schema tables. (See
        <a class="xref" href="performance-schema.html#performance-schema-thread-pool-tables" title="26.12.15 Performance Schema Thread Pool Tables">Section 26.12.15, “Performance Schema Thread Pool Tables”</a>.) The
        <code class="literal">INFORMATION_SCHEMA</code> tables are deprecated and
        will be removed in a future MySQL version. Applications should
        transition away from the old tables to the new tables. For
        example, if an application uses this query:
      </p><pre data-lang="sql" class="programlisting">
SELECT * FROM INFORMATION_SCHEMA.TP_THREAD_GROUP_STATS;
</pre><p>
        The application should use this query instead:
      </p><pre data-lang="sql" class="programlisting">
SELECT * FROM performance_schema.tp_thread_group_stats;
</pre>
</div>
<p>
      The <code class="literal">TP_THREAD_GROUP_STATS</code> table reports
      statistics per thread group. There is one row per group.
    </p><p>
      For descriptions of the columns in the
      <code class="literal">INFORMATION_SCHEMA</code>
      <code class="literal">TP_THREAD_GROUP_STATS</code> table, see
      <a class="xref" href="performance-schema.html#tp-thread-group-stats-table" title="26.12.15.2 The tp_thread_group_stats Table">Section 26.12.15.2, “The tp_thread_group_stats Table”</a>. The Performance
      Schema <a class="link" href="performance-schema.html#tp-thread-group-stats-table" title="26.12.15.2 The tp_thread_group_stats Table"><code class="literal">tp_thread_group_stats</code></a> table
      has equivalent columns.
</p>
</div>

<div class="section">

<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="tp-thread-state-table-old"></a>25.40.3 The INFORMATION_SCHEMA TP_THREAD_STATE Table</h3>

</div>

</div>

</div>
<a class="indexterm" name="idm140091566589984"></a>
<div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">

<div class="admon-title">
Note
</div>
<p>
        As of MySQL 8.0.14, the thread pool
        <code class="literal">INFORMATION_SCHEMA</code> tables are also available
        as Performance Schema tables. (See
        <a class="xref" href="performance-schema.html#performance-schema-thread-pool-tables" title="26.12.15 Performance Schema Thread Pool Tables">Section 26.12.15, “Performance Schema Thread Pool Tables”</a>.) The
        <code class="literal">INFORMATION_SCHEMA</code> tables are deprecated and
        will be removed in a future MySQL version. Applications should
        transition away from the old tables to the new tables. For
        example, if an application uses this query:
      </p><pre data-lang="sql" class="programlisting">
SELECT * FROM INFORMATION_SCHEMA.TP_THREAD_STATE;
</pre><p>
        The application should use this query instead:
      </p><pre data-lang="sql" class="programlisting">
SELECT * FROM performance_schema.tp_thread_state;
</pre>
</div>
<p>
      The <code class="literal">TP_THREAD_STATE</code> table has one row per
      thread created by the thread pool to handle connections.
    </p><p>
      For descriptions of the columns in the
      <code class="literal">INFORMATION_SCHEMA</code>
      <code class="literal">TP_THREAD_STATE</code> table, see
      <a class="xref" href="performance-schema.html#tp-thread-state-table" title="26.12.15.3 The tp_thread_state Table">Section 26.12.15.3, “The tp_thread_state Table”</a>. The Performance Schema
      <a class="link" href="performance-schema.html#tp-thread-state-table" title="26.12.15.3 The tp_thread_state Table"><code class="literal">tp_thread_state</code></a> table has equivalent
      columns.
</p>
</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="connection-control-i_s-tables"></a>25.41 INFORMATION_SCHEMA Connection-Control Tables</h2>

</div>

</div>

</div>
<div class="toc">
<dl class="toc"><dt><span class="section"><a href="information-schema.html#connection-control-failed-login-attempts-table">25.41.1 The INFORMATION_SCHEMA CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS Table</a></span></dt></dl>
</div>
<a class="indexterm" name="idm140091566576448"></a><p>
    The following sections describe the
    <code class="literal">INFORMATION_SCHEMA</code> tables associated with the
    <code class="literal">CONNECTION_CONTROL</code> plugin.
</p>
<div class="section">

<div class="titlepage">
<div>
<div>
<h3 class="title"><a name="connection-control-failed-login-attempts-table"></a>25.41.1 The INFORMATION_SCHEMA CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS Table</h3>
</div>
</div>
</div>
<a class="indexterm" name="idm140091566571872"></a><p>
      This table provides information about the current number of
      consecutive failed connection attempts per client user/host
      combination.
    </p><p>
      <a class="link" href="information-schema.html#connection-control-failed-login-attempts-table" title="25.41.1 The INFORMATION_SCHEMA CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS Table"><code class="literal">CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS</code></a>
      has these columns:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <code class="literal">USERHOST</code>
        </p><p>
          The user/host combination of a client that has failed
          connection attempts, in
          <code class="literal">'<em class="replaceable"><code>user_name</code></em>'@'<em class="replaceable"><code>host_name</code></em>'</code>
          format.
        </p></li><li class="listitem"><p>
          <code class="literal">FAILED_ATTEMPTS</code>
        </p><p>
          The current number of consecutive failed connection attempts
          for the <code class="literal">USERHOST</code> value. This counts all
          failed attempts, regardless of whether they were delayed. The
          number of attempts for which the server added a delay to its
          response is the difference between the
          <code class="literal">FAILED_ATTEMPTS</code> value and the
          <a class="link" href="security.html#sysvar_connection_control_failed_connections_threshold"><code class="literal">connection_control_failed_connections_threshold</code></a>
          system variable value.
</p></li></ul>
</div>
<h4><a name="idm140091566559248"></a>Notes</h4>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          The
          <code class="literal">CONNECTION_CONTROL_FAILED_LOGIN_ATTEMPTS</code>
          plugin must be activated for this table to be available, and
          the <code class="literal">CONNECTION_CONTROL</code> plugin must be
          activated or the table contents will always be empty. See
          <a class="xref" href="security.html#connection-control" title="6.4.2 The Connection-Control Plugins">Section 6.4.2, “The Connection-Control Plugins”</a>.
        </p></li><li class="listitem"><p>
          The table contains rows only for clients that have had one or
          more consecutive failed connection attempts without a
          subsequent successful attempt. When a client connects
          successfully, its failed-connection count is reset to zero and
          the server removes any row corresponding to the client.
        </p></li><li class="listitem"><p>
          Assigning a value to the
          <a class="link" href="security.html#sysvar_connection_control_failed_connections_threshold"><code class="literal">connection_control_failed_connections_threshold</code></a>
          system variable at runtime resets all accumulated
          failed-connection counters to zero, which causes the table to
          become empty.
</p></li></ul>
</div>

</div>

</div>
<div class="section">
<div class="titlepage">
<div>
<div>
<h2 class="title" style="clear: both"><a name="extended-show"></a>25.42 Extensions to SHOW Statements</h2>

</div>

</div>

</div>
<a class="indexterm" name="idm140091566550224"></a><a class="indexterm" name="idm140091566549184"></a><a class="indexterm" name="idm140091566548112"></a><p>
      Some extensions to <a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a> statements
      accompany the implementation of
      <code class="literal">INFORMATION_SCHEMA</code>:
</p>
<div class="itemizedlist">
<ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
          <a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a> can be used to get
          information about the structure of
          <code class="literal">INFORMATION_SCHEMA</code> itself.
        </p></li><li class="listitem"><p>
          Several <a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a> statements accept
          a <code class="literal">WHERE</code> clause that provides more
          flexibility in specifying which rows to display.
</p></li></ul>
</div>
<p>
      <code class="literal">INFORMATION_SCHEMA</code> is an information database,
      so its name is included in the output from
      <a class="link" href="sql-syntax.html#show-databases" title="13.7.6.14 SHOW DATABASES Syntax"><code class="literal">SHOW DATABASES</code></a>. Similarly,
      <a class="link" href="sql-syntax.html#show-tables" title="13.7.6.37 SHOW TABLES Syntax"><code class="literal">SHOW TABLES</code></a> can be used with
      <code class="literal">INFORMATION_SCHEMA</code> to obtain a list of its
      tables:
    </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SHOW TABLES FROM INFORMATION_SCHEMA;</code></strong>
+---------------------------------------+
| Tables_in_INFORMATION_SCHEMA          |
+---------------------------------------+
| CHARACTER_SETS                        |
| COLLATIONS                            |
| COLLATION_CHARACTER_SET_APPLICABILITY |
| COLUMNS                               |
| COLUMN_PRIVILEGES                     |
| ENGINES                               |
| EVENTS                                |
| FILES                                 |
| KEY_COLUMN_USAGE                      |
| PARTITIONS                            |
| PLUGINS                               |
| PROCESSLIST                           |
| REFERENTIAL_CONSTRAINTS               |
| ROUTINES                              |
| SCHEMATA                              |
| SCHEMA_PRIVILEGES                     |
| STATISTICS                            |
| TABLES                                |
| TABLE_CONSTRAINTS                     |
| TABLE_PRIVILEGES                      |
| TRIGGERS                              |
| USER_PRIVILEGES                       |
| VIEWS                                 |
+---------------------------------------+
</pre><p>
      <a class="link" href="sql-syntax.html#show-columns" title="13.7.6.5 SHOW COLUMNS Syntax"><code class="literal">SHOW COLUMNS</code></a> and
      <a class="link" href="sql-syntax.html#describe" title="13.8.1 DESCRIBE Syntax"><code class="literal">DESCRIBE</code></a> can display information
      about the columns in individual
      <code class="literal">INFORMATION_SCHEMA</code> tables.
    </p><p>
      <a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a> statements that accept a
      <a class="link" href="functions.html#operator_like"><code class="literal">LIKE</code></a> clause to limit the rows
      displayed also permit a <code class="literal">WHERE</code> clause that
      specifies more general conditions that selected rows must satisfy:
    </p><pre data-lang="sql" class="programlisting">
SHOW CHARACTER SET
SHOW COLLATION
SHOW COLUMNS
SHOW DATABASES
SHOW FUNCTION STATUS
SHOW INDEX
SHOW OPEN TABLES
SHOW PROCEDURE STATUS
SHOW STATUS
SHOW TABLE STATUS
SHOW TABLES
SHOW TRIGGERS
SHOW VARIABLES
</pre><p>
      The <code class="literal">WHERE</code> clause, if present, is evaluated
      against the column names displayed by the
      <a class="link" href="sql-syntax.html#show" title="13.7.6 SHOW Syntax"><code class="literal">SHOW</code></a> statement. For example, the
      <a class="link" href="sql-syntax.html#show-character-set" title="13.7.6.3 SHOW CHARACTER SET Syntax"><code class="literal">SHOW CHARACTER SET</code></a> statement
      produces these output columns:
    </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SHOW CHARACTER SET;</code></strong>
+----------+-----------------------------+---------------------+--------+
| Charset  | Description                 | Default collation   | Maxlen |
+----------+-----------------------------+---------------------+--------+
| big5     | Big5 Traditional Chinese    | big5_chinese_ci     |      2 |
| dec8     | DEC West European           | dec8_swedish_ci     |      1 |
| cp850    | DOS West European           | cp850_general_ci    |      1 |
| hp8      | HP West European            | hp8_english_ci      |      1 |
| koi8r    | KOI8-R Relcom Russian       | koi8r_general_ci    |      1 |
| latin1   | cp1252 West European        | latin1_swedish_ci   |      1 |
| latin2   | ISO 8859-2 Central European | latin2_general_ci   |      1 |
...
</pre><p>
      To use a <code class="literal">WHERE</code> clause with
      <a class="link" href="sql-syntax.html#show-character-set" title="13.7.6.3 SHOW CHARACTER SET Syntax"><code class="literal">SHOW CHARACTER SET</code></a>, you would refer
      to those column names. As an example, the following statement
      displays information about character sets for which the default
      collation contains the string <code class="literal">'japanese'</code>:
    </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SHOW CHARACTER SET WHERE `Default collation` LIKE '%japanese%';</code></strong>
+---------+---------------------------+---------------------+--------+
| Charset | Description               | Default collation   | Maxlen |
+---------+---------------------------+---------------------+--------+
| ujis    | EUC-JP Japanese           | ujis_japanese_ci    |      3 |
| sjis    | Shift-JIS Japanese        | sjis_japanese_ci    |      2 |
| cp932   | SJIS for Windows Japanese | cp932_japanese_ci   |      2 |
| eucjpms | UJIS for Windows Japanese | eucjpms_japanese_ci |      3 |
+---------+---------------------------+---------------------+--------+
</pre><p>
      This statement displays the multibyte character sets:
    </p><pre data-lang="sql" class="programlisting">
mysql&gt; <strong class="userinput"><code>SHOW CHARACTER SET WHERE Maxlen &gt; 1;</code></strong>
+---------+---------------------------+---------------------+--------+
| Charset | Description               | Default collation   | Maxlen |
+---------+---------------------------+---------------------+--------+
| big5    | Big5 Traditional Chinese  | big5_chinese_ci     |      2 |
| ujis    | EUC-JP Japanese           | ujis_japanese_ci    |      3 |
| sjis    | Shift-JIS Japanese        | sjis_japanese_ci    |      2 |
| euckr   | EUC-KR Korean             | euckr_korean_ci     |      2 |
| gb2312  | GB2312 Simplified Chinese | gb2312_chinese_ci   |      2 |
| gbk     | GBK Simplified Chinese    | gbk_chinese_ci      |      2 |
| utf8    | UTF-8 Unicode             | utf8_general_ci     |      3 |
| ucs2    | UCS-2 Unicode             | ucs2_general_ci     |      2 |
| cp932   | SJIS for Windows Japanese | cp932_japanese_ci   |      2 |
| eucjpms | UJIS for Windows Japanese | eucjpms_japanese_ci |      3 |
+---------+---------------------------+---------------------+--------+
</pre>
</div>

</div>
<div class="copyright-footer">

</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left"><a accesskey="p" href="stored-objects.html">Prev</a></td>
<td width="20%" align="center"><a accesskey="u" href="">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="performance-schema.html">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top">Chapter 24 Stored Objects</td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top">Chapter 26 MySQL Performance Schema</td>
</tr>
</table>
</div>
</body>
</html>
